// @generated by vk-gen — admitted native operations.
use super::{Device, Instance};
use crate::{core as vk, load::CallError};
/// Call `vkGetPhysicalDeviceFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_format_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties,
) -> Result<(), CallError> {
let __vk_function =
instance
.fp()
.get_physical_device_format_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceFormatProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, format, format_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_format_properties(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_format_properties(self, physical_device, format, format_properties)
}
}
}
/// Call `vkGetPhysicalDeviceImageFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn get_physical_device_image_format_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
tiling: vk::ImageTiling,
usage: vk::ImageUsageFlags,
flags: vk::ImageCreateFlags,
image_format_properties: &mut vk::ImageFormatProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_image_format_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceImageFormatProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
format,
r#type,
tiling,
usage,
flags,
image_format_properties,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceImageFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn get_physical_device_image_format_properties(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
tiling: vk::ImageTiling,
usage: vk::ImageUsageFlags,
flags: vk::ImageCreateFlags,
image_format_properties: &mut vk::ImageFormatProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_image_format_properties(
self,
physical_device,
format,
r#type,
tiling,
usage,
flags,
image_format_properties,
)
}
}
}
/// Call `vkEnumerateDeviceLayerProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumerateDeviceLayerProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
pub unsafe fn enumerate_device_layer_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
) -> Result<Vec<vk::LayerProperties>, CallError> {
let __vk_function =
instance
.fp()
.enumerate_device_layer_properties
.ok_or(CallError::MissingCommand(
"vkEnumerateDeviceLayerProperties",
))?;
// SAFETY: native enumeration initializes the reported plain records/bytes within capacity; the caller establishes handle validity.
unsafe {
crate::load::enumerate::enumerate(|count, values| __vk_function(physical_device, count, values))
}
}
impl Instance {
/// Call `vkEnumerateDeviceLayerProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumerateDeviceLayerProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
#[inline]
pub unsafe fn enumerate_device_layer_properties(
&self,
physical_device: vk::PhysicalDevice,
) -> Result<Vec<vk::LayerProperties>, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { enumerate_device_layer_properties(self, physical_device) }
}
}
/// Call `vkDeviceWaitIdle` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDeviceWaitIdle` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn device_wait_idle(device: &Device) -> Result<(), CallError> {
let __vk_function = device
.fp()
.device_wait_idle
.ok_or(CallError::MissingCommand("vkDeviceWaitIdle"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkDeviceWaitIdle` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDeviceWaitIdle` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn device_wait_idle(&self) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { device_wait_idle(self) }
}
}
/// Call `vkGetDeviceMemoryCommitment` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryCommitment` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_device_memory_commitment(
device: &Device,
memory: vk::DeviceMemory,
committed_memory_in_bytes: &mut vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_memory_commitment
.ok_or(CallError::MissingCommand("vkGetDeviceMemoryCommitment"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), memory, committed_memory_in_bytes) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceMemoryCommitment` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryCommitment` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_device_memory_commitment(
&self,
memory: vk::DeviceMemory,
committed_memory_in_bytes: &mut vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_memory_commitment(self, memory, committed_memory_in_bytes) }
}
}
/// Call `vkGetImageMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_image_memory_requirements(
device: &Device,
image: vk::Image,
memory_requirements: &mut vk::MemoryRequirements,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_memory_requirements
.ok_or(CallError::MissingCommand("vkGetImageMemoryRequirements"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), image, memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetImageMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_image_memory_requirements(
&self,
image: vk::Image,
memory_requirements: &mut vk::MemoryRequirements,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_memory_requirements(self, image, memory_requirements) }
}
}
/// Call `vkBindImageMemory` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn bind_image_memory(
device: &Device,
image: vk::Image,
memory: vk::DeviceMemory,
memory_offset: vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.bind_image_memory
.ok_or(CallError::MissingCommand("vkBindImageMemory"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), image, memory, memory_offset) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkBindImageMemory` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn bind_image_memory(
&self,
image: vk::Image,
memory: vk::DeviceMemory,
memory_offset: vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_image_memory(self, image, memory, memory_offset) }
}
}
/// Call `vkGetImageSparseMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
pub unsafe fn get_image_sparse_memory_requirements(
device: &Device,
image: vk::Image,
) -> Result<Vec<vk::SparseImageMemoryRequirements>, CallError> {
let __vk_function =
device
.fp()
.get_image_sparse_memory_requirements
.ok_or(CallError::MissingCommand(
"vkGetImageSparseMemoryRequirements",
))?;
// SAFETY: native enumeration initializes the reported plain records/bytes within capacity; the caller establishes handle validity.
unsafe {
crate::load::enumerate::enumerate_void(|count, values| {
__vk_function(device.handle(), image, count, values)
})
}
}
impl Device {
/// Call `vkGetImageSparseMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
#[inline]
pub unsafe fn get_image_sparse_memory_requirements(
&self,
image: vk::Image,
) -> Result<Vec<vk::SparseImageMemoryRequirements>, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_sparse_memory_requirements(self, image) }
}
}
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
pub unsafe fn get_physical_device_sparse_image_format_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
samples: vk::SampleCountFlagBits,
usage: vk::ImageUsageFlags,
tiling: vk::ImageTiling,
) -> Result<Vec<vk::SparseImageFormatProperties>, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_sparse_image_format_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSparseImageFormatProperties",
))?;
// SAFETY: native enumeration initializes the reported plain records/bytes within capacity; the caller establishes handle validity.
unsafe {
crate::load::enumerate::enumerate_void(|count, values| {
__vk_function(
physical_device,
format,
r#type,
samples,
usage,
tiling,
count,
values,
)
})
}
}
impl Instance {
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
#[inline]
pub unsafe fn get_physical_device_sparse_image_format_properties(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
samples: vk::SampleCountFlagBits,
usage: vk::ImageUsageFlags,
tiling: vk::ImageTiling,
) -> Result<Vec<vk::SparseImageFormatProperties>, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_sparse_image_format_properties(
self,
physical_device,
format,
r#type,
samples,
usage,
tiling,
)
}
}
}
/// Call `vkQueueBindSparse` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueBindSparse` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn queue_bind_sparse(
device: &Device,
queue: vk::Queue,
bind_info: &[vk::BindSparseInfo],
fence: vk::Fence,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_bind_sparse
.ok_or(CallError::MissingCommand("vkQueueBindSparse"))?;
let bind_info_count =
u32::try_from(bind_info.len()).map_err(|_| CallError::CountOverflow(bind_info.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, bind_info_count, bind_info.as_ptr(), fence) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkQueueBindSparse` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueBindSparse` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn queue_bind_sparse(
&self,
queue: vk::Queue,
bind_info: &[vk::BindSparseInfo],
fence: vk::Fence,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_bind_sparse(self, queue, bind_info, fence) }
}
}
/// Call `vkGetFenceStatus` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceStatus` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_fence_status(device: &Device, fence: vk::Fence) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_fence_status
.ok_or(CallError::MissingCommand("vkGetFenceStatus"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), fence) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetFenceStatus` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceStatus` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_fence_status(&self, fence: vk::Fence) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_fence_status(self, fence) }
}
}
/// Call `vkCreateSemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_semaphore(
device: &Device,
create_info: &vk::SemaphoreCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Semaphore, CallError> {
let __vk_function = device
.fp()
.create_semaphore
.ok_or(CallError::MissingCommand("vkCreateSemaphore"))?;
let mut output = vk::Semaphore::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateSemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_semaphore(
&self,
create_info: &vk::SemaphoreCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Semaphore, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_semaphore(self, create_info, allocator) }
}
}
/// Call `vkDestroySemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_semaphore(
device: &Device,
semaphore: vk::Semaphore,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_semaphore
.ok_or(CallError::MissingCommand("vkDestroySemaphore"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
semaphore,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroySemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_semaphore(
&self,
semaphore: vk::Semaphore,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_semaphore(self, semaphore, allocator) }
}
}
/// Call `vkCreateEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_event(
device: &Device,
create_info: &vk::EventCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Event, CallError> {
let __vk_function = device
.fp()
.create_event
.ok_or(CallError::MissingCommand("vkCreateEvent"))?;
let mut output = vk::Event::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_event(
&self,
create_info: &vk::EventCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Event, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_event(self, create_info, allocator) }
}
}
/// Call `vkDestroyEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_event(
device: &Device,
event: vk::Event,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_event
.ok_or(CallError::MissingCommand("vkDestroyEvent"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
event,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_event(
&self,
event: vk::Event,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_event(self, event, allocator) }
}
}
/// Call `vkGetEventStatus` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetEventStatus` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_event_status(device: &Device, event: vk::Event) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_event_status
.ok_or(CallError::MissingCommand("vkGetEventStatus"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), event) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetEventStatus` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetEventStatus` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_event_status(&self, event: vk::Event) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_event_status(self, event) }
}
}
/// Call `vkSetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn set_event(device: &Device, event: vk::Event) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_event
.ok_or(CallError::MissingCommand("vkSetEvent"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), event) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkSetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn set_event(&self, event: vk::Event) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_event(self, event) }
}
}
/// Call `vkResetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_event(device: &Device, event: vk::Event) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_event
.ok_or(CallError::MissingCommand("vkResetEvent"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), event) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkResetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_event(&self, event: vk::Event) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_event(self, event) }
}
}
/// Call `vkCreateQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_query_pool(
device: &Device,
create_info: &vk::QueryPoolCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::QueryPool, CallError> {
let __vk_function = device
.fp()
.create_query_pool
.ok_or(CallError::MissingCommand("vkCreateQueryPool"))?;
let mut output = vk::QueryPool::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_query_pool(
&self,
create_info: &vk::QueryPoolCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::QueryPool, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_query_pool(self, create_info, allocator) }
}
}
/// Call `vkDestroyQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_query_pool(
device: &Device,
query_pool: vk::QueryPool,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_query_pool
.ok_or(CallError::MissingCommand("vkDestroyQueryPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
query_pool,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_query_pool(
&self,
query_pool: vk::QueryPool,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_query_pool(self, query_pool, allocator) }
}
}
/// Call `vkGetQueryPoolResults` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueryPoolResults` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
pub unsafe fn get_query_pool_results(
device: &Device,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
data: &mut [u8],
stride: vk::DeviceSize,
flags: vk::QueryResultFlags,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_query_pool_results
.ok_or(CallError::MissingCommand("vkGetQueryPoolResults"))?;
let data_size = data.len();
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
query_pool,
first_query,
query_count,
data_size,
data.as_mut_ptr().cast(),
stride,
flags,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetQueryPoolResults` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueryPoolResults` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
#[inline]
pub unsafe fn get_query_pool_results(
&self,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
data: &mut [u8],
stride: vk::DeviceSize,
flags: vk::QueryResultFlags,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_query_pool_results(
self,
query_pool,
first_query,
query_count,
data,
stride,
flags,
)
}
}
}
/// Call `vkResetQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_query_pool(
device: &Device,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_query_pool
.ok_or(CallError::MissingCommand("vkResetQueryPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), query_pool, first_query, query_count) };
Ok(())
}
impl Device {
/// Call `vkResetQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_query_pool(
&self,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_query_pool(self, query_pool, first_query, query_count) }
}
}
/// Call `vkResetQueryPoolEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetQueryPoolEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_query_pool_ext(
device: &Device,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_query_pool_ext
.ok_or(CallError::MissingCommand("vkResetQueryPoolEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), query_pool, first_query, query_count) };
Ok(())
}
impl Device {
/// Call `vkResetQueryPoolEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetQueryPoolEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_query_pool_ext(
&self,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_query_pool_ext(self, query_pool, first_query, query_count) }
}
}
/// Call `vkCreateBufferView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateBufferView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_buffer_view(
device: &Device,
create_info: &vk::BufferViewCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::BufferView, CallError> {
let __vk_function = device
.fp()
.create_buffer_view
.ok_or(CallError::MissingCommand("vkCreateBufferView"))?;
let mut output = vk::BufferView::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateBufferView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateBufferView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_buffer_view(
&self,
create_info: &vk::BufferViewCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::BufferView, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_buffer_view(self, create_info, allocator) }
}
}
/// Call `vkDestroyBufferView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyBufferView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_buffer_view(
device: &Device,
buffer_view: vk::BufferView,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_buffer_view
.ok_or(CallError::MissingCommand("vkDestroyBufferView"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
buffer_view,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyBufferView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyBufferView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_buffer_view(
&self,
buffer_view: vk::BufferView,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_buffer_view(self, buffer_view, allocator) }
}
}
/// Call `vkCreateImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_image(
device: &Device,
create_info: &vk::ImageCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Image, CallError> {
let __vk_function = device
.fp()
.create_image
.ok_or(CallError::MissingCommand("vkCreateImage"))?;
let mut output = vk::Image::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_image(
&self,
create_info: &vk::ImageCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Image, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_image(self, create_info, allocator) }
}
}
/// Call `vkDestroyImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_image(
device: &Device,
image: vk::Image,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_image
.ok_or(CallError::MissingCommand("vkDestroyImage"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
image,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_image(
&self,
image: vk::Image,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_image(self, image, allocator) }
}
}
/// Call `vkGetImageSubresourceLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_image_subresource_layout(
device: &Device,
image: vk::Image,
subresource: &vk::ImageSubresource,
layout: &mut vk::SubresourceLayout,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_subresource_layout
.ok_or(CallError::MissingCommand("vkGetImageSubresourceLayout"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), image, subresource, layout) };
Ok(())
}
impl Device {
/// Call `vkGetImageSubresourceLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_image_subresource_layout(
&self,
image: vk::Image,
subresource: &vk::ImageSubresource,
layout: &mut vk::SubresourceLayout,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_subresource_layout(self, image, subresource, layout) }
}
}
/// Call `vkCreateImageView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImageView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_image_view(
device: &Device,
create_info: &vk::ImageViewCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::ImageView, CallError> {
let __vk_function = device
.fp()
.create_image_view
.ok_or(CallError::MissingCommand("vkCreateImageView"))?;
let mut output = vk::ImageView::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateImageView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImageView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_image_view(
&self,
create_info: &vk::ImageViewCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::ImageView, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_image_view(self, create_info, allocator) }
}
}
/// Call `vkDestroyImageView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyImageView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_image_view(
device: &Device,
image_view: vk::ImageView,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_image_view
.ok_or(CallError::MissingCommand("vkDestroyImageView"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
image_view,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyImageView` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyImageView` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_image_view(
&self,
image_view: vk::ImageView,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_image_view(self, image_view, allocator) }
}
}
/// Call `vkCreateShaderModule` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShaderModule` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_shader_module(
device: &Device,
create_info: &vk::ShaderModuleCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::ShaderModule, CallError> {
let __vk_function = device
.fp()
.create_shader_module
.ok_or(CallError::MissingCommand("vkCreateShaderModule"))?;
let mut output = vk::ShaderModule::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateShaderModule` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShaderModule` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_shader_module(
&self,
create_info: &vk::ShaderModuleCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::ShaderModule, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_shader_module(self, create_info, allocator) }
}
}
/// Call `vkDestroyShaderModule` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderModule` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_shader_module(
device: &Device,
shader_module: vk::ShaderModule,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_shader_module
.ok_or(CallError::MissingCommand("vkDestroyShaderModule"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
shader_module,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyShaderModule` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderModule` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_shader_module(
&self,
shader_module: vk::ShaderModule,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_shader_module(self, shader_module, allocator) }
}
}
/// Call `vkCreatePipelineCache` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineCache` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_pipeline_cache(
device: &Device,
create_info: &vk::PipelineCacheCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::PipelineCache, CallError> {
let __vk_function = device
.fp()
.create_pipeline_cache
.ok_or(CallError::MissingCommand("vkCreatePipelineCache"))?;
let mut output = vk::PipelineCache::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreatePipelineCache` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineCache` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_pipeline_cache(
&self,
create_info: &vk::PipelineCacheCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::PipelineCache, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_pipeline_cache(self, create_info, allocator) }
}
}
/// Call `vkDestroyPipelineCache` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineCache` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_pipeline_cache(
device: &Device,
pipeline_cache: vk::PipelineCache,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_pipeline_cache
.ok_or(CallError::MissingCommand("vkDestroyPipelineCache"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
pipeline_cache,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyPipelineCache` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineCache` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_pipeline_cache(
&self,
pipeline_cache: vk::PipelineCache,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_pipeline_cache(self, pipeline_cache, allocator) }
}
}
/// Call `vkGetPipelineCacheData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineCacheData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
pub unsafe fn get_pipeline_cache_data(
device: &Device,
pipeline_cache: vk::PipelineCache,
) -> Result<Vec<u8>, CallError> {
let __vk_function = device
.fp()
.get_pipeline_cache_data
.ok_or(CallError::MissingCommand("vkGetPipelineCacheData"))?;
// SAFETY: native enumeration initializes the reported plain records/bytes within capacity; the caller establishes handle validity.
unsafe {
crate::load::enumerate::enumerate_bytes(|count, values| {
__vk_function(device.handle(), pipeline_cache, count, values.cast())
})
}
}
impl Device {
/// Call `vkGetPipelineCacheData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineCacheData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Retries incomplete/growing results with a bounded budget; returns an error
/// if the query does not stabilize. Allocates the returned vector.
#[inline]
pub unsafe fn get_pipeline_cache_data(
&self,
pipeline_cache: vk::PipelineCache,
) -> Result<Vec<u8>, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_pipeline_cache_data(self, pipeline_cache) }
}
}
/// Call `vkMergePipelineCaches` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMergePipelineCaches` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn merge_pipeline_caches(
device: &Device,
dst_cache: vk::PipelineCache,
src_caches: &[vk::PipelineCache],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.merge_pipeline_caches
.ok_or(CallError::MissingCommand("vkMergePipelineCaches"))?;
let src_cache_count =
u32::try_from(src_caches.len()).map_err(|_| CallError::CountOverflow(src_caches.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
dst_cache,
src_cache_count,
src_caches.as_ptr(),
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkMergePipelineCaches` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMergePipelineCaches` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn merge_pipeline_caches(
&self,
dst_cache: vk::PipelineCache,
src_caches: &[vk::PipelineCache],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { merge_pipeline_caches(self, dst_cache, src_caches) }
}
}
/// Call `vkCreatePipelineBinariesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineBinariesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_pipeline_binaries_khr(
device: &Device,
p_create_info: *const vk::PipelineBinaryCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_binaries: *mut vk::PipelineBinaryHandlesInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_pipeline_binaries_khr
.ok_or(CallError::MissingCommand("vkCreatePipelineBinariesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_binaries) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreatePipelineBinariesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineBinariesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_pipeline_binaries_khr(
&self,
p_create_info: *const vk::PipelineBinaryCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_binaries: *mut vk::PipelineBinaryHandlesInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_pipeline_binaries_khr(self, p_create_info, p_allocator, p_binaries) }
}
}
/// Call `vkDestroyPipelineBinaryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineBinaryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_pipeline_binary_khr(
device: &Device,
pipeline_binary: vk::PipelineBinaryKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_pipeline_binary_khr
.ok_or(CallError::MissingCommand("vkDestroyPipelineBinaryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), pipeline_binary, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyPipelineBinaryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineBinaryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_pipeline_binary_khr(
&self,
pipeline_binary: vk::PipelineBinaryKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_pipeline_binary_khr(self, pipeline_binary, p_allocator) }
}
}
/// Call `vkGetPipelineKeyKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineKeyKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_key_khr(
device: &Device,
p_pipeline_create_info: *const vk::PipelineCreateInfoKHR,
p_pipeline_key: *mut vk::PipelineBinaryKeyKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_pipeline_key_khr
.ok_or(CallError::MissingCommand("vkGetPipelineKeyKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_pipeline_create_info, p_pipeline_key) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelineKeyKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineKeyKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_key_khr(
&self,
p_pipeline_create_info: *const vk::PipelineCreateInfoKHR,
p_pipeline_key: *mut vk::PipelineBinaryKeyKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_pipeline_key_khr(self, p_pipeline_create_info, p_pipeline_key) }
}
}
/// Call `vkGetPipelineBinaryDataKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineBinaryDataKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_binary_data_khr(
device: &Device,
p_info: *const vk::PipelineBinaryDataInfoKHR,
p_pipeline_binary_key: *mut vk::PipelineBinaryKeyKHR,
p_pipeline_binary_data_size: *mut usize,
p_pipeline_binary_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_pipeline_binary_data_khr
.ok_or(CallError::MissingCommand("vkGetPipelineBinaryDataKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_info,
p_pipeline_binary_key,
p_pipeline_binary_data_size,
p_pipeline_binary_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelineBinaryDataKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineBinaryDataKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_binary_data_khr(
&self,
p_info: *const vk::PipelineBinaryDataInfoKHR,
p_pipeline_binary_key: *mut vk::PipelineBinaryKeyKHR,
p_pipeline_binary_data_size: *mut usize,
p_pipeline_binary_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_pipeline_binary_data_khr(
self,
p_info,
p_pipeline_binary_key,
p_pipeline_binary_data_size,
p_pipeline_binary_data,
)
}
}
}
/// Call `vkReleaseCapturedPipelineDataKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseCapturedPipelineDataKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_captured_pipeline_data_khr(
device: &Device,
p_info: *const vk::ReleaseCapturedPipelineDataInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.release_captured_pipeline_data_khr
.ok_or(CallError::MissingCommand(
"vkReleaseCapturedPipelineDataKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_allocator) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkReleaseCapturedPipelineDataKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseCapturedPipelineDataKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_captured_pipeline_data_khr(
&self,
p_info: *const vk::ReleaseCapturedPipelineDataInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_captured_pipeline_data_khr(self, p_info, p_allocator) }
}
}
/// Call `vkCreateGraphicsPipelines` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateGraphicsPipelines` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns non-error native status codes unchanged, including compile-required.
/// On native failure, output slots can contain successfully created pipelines;
/// the caller must inspect and destroy every non-null handle. Slots are not reset
/// before the call: their previous contents must not own live resources.
pub unsafe fn create_graphics_pipelines(
device: &Device,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::GraphicsPipelineCreateInfo],
allocator: Option<&vk::AllocationCallbacks>,
pipelines: &mut [vk::Pipeline],
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_graphics_pipelines
.ok_or(CallError::MissingCommand("vkCreateGraphicsPipelines"))?;
let create_info_count =
u32::try_from(create_infos.len()).map_err(|_| CallError::CountOverflow(create_infos.len()))?;
if pipelines.len() != create_infos.len() {
return Err(CallError::SliceLengthMismatch {
parameter: "pipelines",
expected: create_infos.len(),
actual: pipelines.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline_cache,
create_info_count,
create_infos.as_ptr(),
allocator.map_or(std::ptr::null(), |value| value),
pipelines.as_mut_ptr(),
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateGraphicsPipelines` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateGraphicsPipelines` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns non-error native status codes unchanged, including compile-required.
/// On native failure, output slots can contain successfully created pipelines;
/// the caller must inspect and destroy every non-null handle. Slots are not reset
/// before the call: their previous contents must not own live resources.
#[inline]
pub unsafe fn create_graphics_pipelines(
&self,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::GraphicsPipelineCreateInfo],
allocator: Option<&vk::AllocationCallbacks>,
pipelines: &mut [vk::Pipeline],
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_graphics_pipelines(self, pipeline_cache, create_infos, allocator, pipelines) }
}
}
/// Call `vkCreateComputePipelines` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateComputePipelines` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns non-error native status codes unchanged, including compile-required.
/// On native failure, output slots can contain successfully created pipelines;
/// the caller must inspect and destroy every non-null handle. Slots are not reset
/// before the call: their previous contents must not own live resources.
pub unsafe fn create_compute_pipelines(
device: &Device,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::ComputePipelineCreateInfo],
allocator: Option<&vk::AllocationCallbacks>,
pipelines: &mut [vk::Pipeline],
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_compute_pipelines
.ok_or(CallError::MissingCommand("vkCreateComputePipelines"))?;
let create_info_count =
u32::try_from(create_infos.len()).map_err(|_| CallError::CountOverflow(create_infos.len()))?;
if pipelines.len() != create_infos.len() {
return Err(CallError::SliceLengthMismatch {
parameter: "pipelines",
expected: create_infos.len(),
actual: pipelines.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline_cache,
create_info_count,
create_infos.as_ptr(),
allocator.map_or(std::ptr::null(), |value| value),
pipelines.as_mut_ptr(),
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateComputePipelines` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateComputePipelines` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns non-error native status codes unchanged, including compile-required.
/// On native failure, output slots can contain successfully created pipelines;
/// the caller must inspect and destroy every non-null handle. Slots are not reset
/// before the call: their previous contents must not own live resources.
#[inline]
pub unsafe fn create_compute_pipelines(
&self,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::ComputePipelineCreateInfo],
allocator: Option<&vk::AllocationCallbacks>,
pipelines: &mut [vk::Pipeline],
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_compute_pipelines(self, pipeline_cache, create_infos, allocator, pipelines) }
}
}
/// Call `vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_subpass_shading_max_workgroup_size_huawei(
device: &Device,
renderpass: vk::RenderPass,
p_max_workgroup_size: *mut vk::Extent2D,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_subpass_shading_max_workgroup_size_huawei
.ok_or(CallError::MissingCommand(
"vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), renderpass, p_max_workgroup_size) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_subpass_shading_max_workgroup_size_huawei(
&self,
renderpass: vk::RenderPass,
p_max_workgroup_size: *mut vk::Extent2D,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_subpass_shading_max_workgroup_size_huawei(self, renderpass, p_max_workgroup_size)
}
}
}
/// Call `vkDestroyPipeline` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipeline` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_pipeline(
device: &Device,
pipeline: vk::Pipeline,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_pipeline
.ok_or(CallError::MissingCommand("vkDestroyPipeline"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
pipeline,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyPipeline` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipeline` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_pipeline(
&self,
pipeline: vk::Pipeline,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_pipeline(self, pipeline, allocator) }
}
}
/// Call `vkCreatePipelineLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_pipeline_layout(
device: &Device,
create_info: &vk::PipelineLayoutCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::PipelineLayout, CallError> {
let __vk_function = device
.fp()
.create_pipeline_layout
.ok_or(CallError::MissingCommand("vkCreatePipelineLayout"))?;
let mut output = vk::PipelineLayout::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreatePipelineLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePipelineLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_pipeline_layout(
&self,
create_info: &vk::PipelineLayoutCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::PipelineLayout, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_pipeline_layout(self, create_info, allocator) }
}
}
/// Call `vkDestroyPipelineLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_pipeline_layout(
device: &Device,
pipeline_layout: vk::PipelineLayout,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_pipeline_layout
.ok_or(CallError::MissingCommand("vkDestroyPipelineLayout"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
pipeline_layout,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyPipelineLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPipelineLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_pipeline_layout(
&self,
pipeline_layout: vk::PipelineLayout,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_pipeline_layout(self, pipeline_layout, allocator) }
}
}
/// Call `vkCreateSampler` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSampler` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_sampler(
device: &Device,
create_info: &vk::SamplerCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Sampler, CallError> {
let __vk_function = device
.fp()
.create_sampler
.ok_or(CallError::MissingCommand("vkCreateSampler"))?;
let mut output = vk::Sampler::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateSampler` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSampler` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_sampler(
&self,
create_info: &vk::SamplerCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Sampler, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_sampler(self, create_info, allocator) }
}
}
/// Call `vkDestroySampler` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySampler` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_sampler(
device: &Device,
sampler: vk::Sampler,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_sampler
.ok_or(CallError::MissingCommand("vkDestroySampler"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
sampler,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroySampler` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySampler` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_sampler(
&self,
sampler: vk::Sampler,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_sampler(self, sampler, allocator) }
}
}
/// Call `vkCreateDescriptorSetLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorSetLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_descriptor_set_layout(
device: &Device,
create_info: &vk::DescriptorSetLayoutCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorSetLayout, CallError> {
let __vk_function = device
.fp()
.create_descriptor_set_layout
.ok_or(CallError::MissingCommand("vkCreateDescriptorSetLayout"))?;
let mut output = vk::DescriptorSetLayout::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateDescriptorSetLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorSetLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_descriptor_set_layout(
&self,
create_info: &vk::DescriptorSetLayoutCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorSetLayout, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_descriptor_set_layout(self, create_info, allocator) }
}
}
/// Call `vkDestroyDescriptorSetLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorSetLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_descriptor_set_layout(
device: &Device,
descriptor_set_layout: vk::DescriptorSetLayout,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_descriptor_set_layout
.ok_or(CallError::MissingCommand("vkDestroyDescriptorSetLayout"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_set_layout,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyDescriptorSetLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorSetLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_descriptor_set_layout(
&self,
descriptor_set_layout: vk::DescriptorSetLayout,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_descriptor_set_layout(self, descriptor_set_layout, allocator) }
}
}
/// Call `vkCreateDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_descriptor_pool(
device: &Device,
create_info: &vk::DescriptorPoolCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorPool, CallError> {
let __vk_function = device
.fp()
.create_descriptor_pool
.ok_or(CallError::MissingCommand("vkCreateDescriptorPool"))?;
let mut output = vk::DescriptorPool::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_descriptor_pool(
&self,
create_info: &vk::DescriptorPoolCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorPool, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_descriptor_pool(self, create_info, allocator) }
}
}
/// Call `vkDestroyDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_descriptor_pool(
device: &Device,
descriptor_pool: vk::DescriptorPool,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_descriptor_pool
.ok_or(CallError::MissingCommand("vkDestroyDescriptorPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_pool,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_descriptor_pool(
&self,
descriptor_pool: vk::DescriptorPool,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_descriptor_pool(self, descriptor_pool, allocator) }
}
}
/// Call `vkResetDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_descriptor_pool(
device: &Device,
descriptor_pool: vk::DescriptorPool,
flags: vk::DescriptorPoolResetFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_descriptor_pool
.ok_or(CallError::MissingCommand("vkResetDescriptorPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), descriptor_pool, flags) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkResetDescriptorPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetDescriptorPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_descriptor_pool(
&self,
descriptor_pool: vk::DescriptorPool,
flags: vk::DescriptorPoolResetFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_descriptor_pool(self, descriptor_pool, flags) }
}
}
/// Call `vkAllocateDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAllocateDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn allocate_descriptor_sets(
device: &Device,
allocate_info: &vk::DescriptorSetAllocateInfo,
descriptor_sets: &mut [vk::DescriptorSet],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.allocate_descriptor_sets
.ok_or(CallError::MissingCommand("vkAllocateDescriptorSets"))?;
let descriptor_sets_expected = usize::try_from(allocate_info.descriptor_set_count)
.map_err(|_| CallError::CountOverflow(usize::MAX))?;
if descriptor_sets.len() != descriptor_sets_expected {
return Err(CallError::SliceLengthMismatch {
parameter: "descriptor_sets",
expected: descriptor_sets_expected,
actual: descriptor_sets.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(device.handle(), allocate_info, descriptor_sets.as_mut_ptr()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkAllocateDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAllocateDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn allocate_descriptor_sets(
&self,
allocate_info: &vk::DescriptorSetAllocateInfo,
descriptor_sets: &mut [vk::DescriptorSet],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { allocate_descriptor_sets(self, allocate_info, descriptor_sets) }
}
}
/// Call `vkFreeDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkFreeDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn free_descriptor_sets(
device: &Device,
descriptor_pool: vk::DescriptorPool,
descriptor_sets: &[vk::DescriptorSet],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.free_descriptor_sets
.ok_or(CallError::MissingCommand("vkFreeDescriptorSets"))?;
let descriptor_set_count = u32::try_from(descriptor_sets.len())
.map_err(|_| CallError::CountOverflow(descriptor_sets.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
descriptor_pool,
descriptor_set_count,
descriptor_sets.as_ptr(),
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkFreeDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkFreeDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn free_descriptor_sets(
&self,
descriptor_pool: vk::DescriptorPool,
descriptor_sets: &[vk::DescriptorSet],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { free_descriptor_sets(self, descriptor_pool, descriptor_sets) }
}
}
/// Call `vkUpdateDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn update_descriptor_sets(
device: &Device,
descriptor_writes: &[vk::WriteDescriptorSet],
descriptor_copies: &[vk::CopyDescriptorSet],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.update_descriptor_sets
.ok_or(CallError::MissingCommand("vkUpdateDescriptorSets"))?;
let descriptor_write_count = u32::try_from(descriptor_writes.len())
.map_err(|_| CallError::CountOverflow(descriptor_writes.len()))?;
let descriptor_copy_count = u32::try_from(descriptor_copies.len())
.map_err(|_| CallError::CountOverflow(descriptor_copies.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_write_count,
descriptor_writes.as_ptr(),
descriptor_copy_count,
descriptor_copies.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkUpdateDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn update_descriptor_sets(
&self,
descriptor_writes: &[vk::WriteDescriptorSet],
descriptor_copies: &[vk::CopyDescriptorSet],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { update_descriptor_sets(self, descriptor_writes, descriptor_copies) }
}
}
/// Call `vkCreateFramebuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateFramebuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_framebuffer(
device: &Device,
create_info: &vk::FramebufferCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Framebuffer, CallError> {
let __vk_function = device
.fp()
.create_framebuffer
.ok_or(CallError::MissingCommand("vkCreateFramebuffer"))?;
let mut output = vk::Framebuffer::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateFramebuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateFramebuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_framebuffer(
&self,
create_info: &vk::FramebufferCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::Framebuffer, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_framebuffer(self, create_info, allocator) }
}
}
/// Call `vkDestroyFramebuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyFramebuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_framebuffer(
device: &Device,
framebuffer: vk::Framebuffer,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_framebuffer
.ok_or(CallError::MissingCommand("vkDestroyFramebuffer"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
framebuffer,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyFramebuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyFramebuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_framebuffer(
&self,
framebuffer: vk::Framebuffer,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_framebuffer(self, framebuffer, allocator) }
}
}
/// Call `vkCreateRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_render_pass(
device: &Device,
create_info: &vk::RenderPassCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
let __vk_function = device
.fp()
.create_render_pass
.ok_or(CallError::MissingCommand("vkCreateRenderPass"))?;
let mut output = vk::RenderPass::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_render_pass(
&self,
create_info: &vk::RenderPassCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_render_pass(self, create_info, allocator) }
}
}
/// Call `vkDestroyRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_render_pass(
device: &Device,
render_pass: vk::RenderPass,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_render_pass
.ok_or(CallError::MissingCommand("vkDestroyRenderPass"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
render_pass,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_render_pass(
&self,
render_pass: vk::RenderPass,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_render_pass(self, render_pass, allocator) }
}
}
/// Call `vkGetRenderAreaGranularity` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderAreaGranularity` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_render_area_granularity(
device: &Device,
render_pass: vk::RenderPass,
granularity: &mut vk::Extent2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_render_area_granularity
.ok_or(CallError::MissingCommand("vkGetRenderAreaGranularity"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), render_pass, granularity) };
Ok(())
}
impl Device {
/// Call `vkGetRenderAreaGranularity` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderAreaGranularity` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_render_area_granularity(
&self,
render_pass: vk::RenderPass,
granularity: &mut vk::Extent2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_render_area_granularity(self, render_pass, granularity) }
}
}
/// Call `vkGetRenderingAreaGranularity` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderingAreaGranularity` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_rendering_area_granularity(
device: &Device,
p_rendering_area_info: *const vk::RenderingAreaInfo,
p_granularity: *mut vk::Extent2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_rendering_area_granularity
.ok_or(CallError::MissingCommand("vkGetRenderingAreaGranularity"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_rendering_area_info, p_granularity) };
Ok(())
}
impl Device {
/// Call `vkGetRenderingAreaGranularity` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderingAreaGranularity` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_rendering_area_granularity(
&self,
p_rendering_area_info: *const vk::RenderingAreaInfo,
p_granularity: *mut vk::Extent2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_rendering_area_granularity(self, p_rendering_area_info, p_granularity) }
}
}
/// Call `vkGetRenderingAreaGranularityKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderingAreaGranularityKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_rendering_area_granularity_khr(
device: &Device,
p_rendering_area_info: *const vk::RenderingAreaInfo,
p_granularity: *mut vk::Extent2D,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_rendering_area_granularity_khr
.ok_or(CallError::MissingCommand(
"vkGetRenderingAreaGranularityKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_rendering_area_info, p_granularity) };
Ok(())
}
impl Device {
/// Call `vkGetRenderingAreaGranularityKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRenderingAreaGranularityKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_rendering_area_granularity_khr(
&self,
p_rendering_area_info: *const vk::RenderingAreaInfo,
p_granularity: *mut vk::Extent2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_rendering_area_granularity_khr(self, p_rendering_area_info, p_granularity) }
}
}
/// Call `vkResetCommandPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetCommandPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_command_pool(
device: &Device,
command_pool: vk::CommandPool,
flags: vk::CommandPoolResetFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_command_pool
.ok_or(CallError::MissingCommand("vkResetCommandPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), command_pool, flags) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkResetCommandPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetCommandPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_command_pool(
&self,
command_pool: vk::CommandPool,
flags: vk::CommandPoolResetFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_command_pool(self, command_pool, flags) }
}
}
/// Call `vkResetCommandBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetCommandBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn reset_command_buffer(
device: &Device,
command_buffer: vk::CommandBuffer,
flags: vk::CommandBufferResetFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.reset_command_buffer
.ok_or(CallError::MissingCommand("vkResetCommandBuffer"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, flags) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkResetCommandBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetCommandBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn reset_command_buffer(
&self,
command_buffer: vk::CommandBuffer,
flags: vk::CommandBufferResetFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_command_buffer(self, command_buffer, flags) }
}
}
/// Call `vkCmdBindPipeline` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindPipeline` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_bind_pipeline(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_pipeline
.ok_or(CallError::MissingCommand("vkCmdBindPipeline"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_bind_point, pipeline) };
Ok(())
}
impl Device {
/// Call `vkCmdBindPipeline` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindPipeline` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_bind_pipeline(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_pipeline(self, command_buffer, pipeline_bind_point, pipeline) }
}
}
/// Call `vkCmdSetPrimitiveRestartIndexEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartIndexEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_primitive_restart_index_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
primitive_restart_index: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_primitive_restart_index_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetPrimitiveRestartIndexEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, primitive_restart_index) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPrimitiveRestartIndexEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartIndexEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_primitive_restart_index_ext(
&self,
command_buffer: vk::CommandBuffer,
primitive_restart_index: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_primitive_restart_index_ext(self, command_buffer, primitive_restart_index) }
}
}
/// Call `vkCmdSetAttachmentFeedbackLoopEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAttachmentFeedbackLoopEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_attachment_feedback_loop_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
aspect_mask: vk::ImageAspectFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_attachment_feedback_loop_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetAttachmentFeedbackLoopEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, aspect_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetAttachmentFeedbackLoopEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAttachmentFeedbackLoopEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_attachment_feedback_loop_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
aspect_mask: vk::ImageAspectFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_attachment_feedback_loop_enable_ext(self, command_buffer, aspect_mask) }
}
}
/// Call `vkCmdSetViewport` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewport` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_viewport(
device: &Device,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewports: &[vk::Viewport],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_viewport
.ok_or(CallError::MissingCommand("vkCmdSetViewport"))?;
let viewport_count =
u32::try_from(viewports.len()).map_err(|_| CallError::CountOverflow(viewports.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_viewport,
viewport_count,
viewports.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetViewport` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewport` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_viewport(
&self,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewports: &[vk::Viewport],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_viewport(self, command_buffer, first_viewport, viewports) }
}
}
/// Call `vkCmdSetScissor` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissor` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_scissor(
device: &Device,
command_buffer: vk::CommandBuffer,
first_scissor: u32,
scissors: &[vk::Rect2D],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_scissor
.ok_or(CallError::MissingCommand("vkCmdSetScissor"))?;
let scissor_count =
u32::try_from(scissors.len()).map_err(|_| CallError::CountOverflow(scissors.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_scissor,
scissor_count,
scissors.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetScissor` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissor` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_scissor(
&self,
command_buffer: vk::CommandBuffer,
first_scissor: u32,
scissors: &[vk::Rect2D],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_scissor(self, command_buffer, first_scissor, scissors) }
}
}
/// Call `vkCmdSetLineWidth` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineWidth` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_line_width(
device: &Device,
command_buffer: vk::CommandBuffer,
line_width: f32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_line_width
.ok_or(CallError::MissingCommand("vkCmdSetLineWidth"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, line_width) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineWidth` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineWidth` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_line_width(
&self,
command_buffer: vk::CommandBuffer,
line_width: f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_line_width(self, command_buffer, line_width) }
}
}
/// Call `vkCmdSetDepthBias` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBias` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_depth_bias(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_bias_constant_factor: f32,
depth_bias_clamp: f32,
depth_bias_slope_factor: f32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bias
.ok_or(CallError::MissingCommand("vkCmdSetDepthBias"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
depth_bias_constant_factor,
depth_bias_clamp,
depth_bias_slope_factor,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBias` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBias` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_depth_bias(
&self,
command_buffer: vk::CommandBuffer,
depth_bias_constant_factor: f32,
depth_bias_clamp: f32,
depth_bias_slope_factor: f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_depth_bias(
self,
command_buffer,
depth_bias_constant_factor,
depth_bias_clamp,
depth_bias_slope_factor,
)
}
}
}
/// Call `vkCmdSetBlendConstants` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetBlendConstants` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_blend_constants(
device: &Device,
command_buffer: vk::CommandBuffer,
blend_constants: &[f32; 4],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_blend_constants
.ok_or(CallError::MissingCommand("vkCmdSetBlendConstants"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, blend_constants.as_ptr()) };
Ok(())
}
impl Device {
/// Call `vkCmdSetBlendConstants` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetBlendConstants` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_blend_constants(
&self,
command_buffer: vk::CommandBuffer,
blend_constants: &[f32; 4],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_blend_constants(self, command_buffer, blend_constants) }
}
}
/// Call `vkCmdSetDepthBounds` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBounds` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_depth_bounds(
device: &Device,
command_buffer: vk::CommandBuffer,
min_depth_bounds: f32,
max_depth_bounds: f32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bounds
.ok_or(CallError::MissingCommand("vkCmdSetDepthBounds"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, min_depth_bounds, max_depth_bounds) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBounds` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBounds` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_depth_bounds(
&self,
command_buffer: vk::CommandBuffer,
min_depth_bounds: f32,
max_depth_bounds: f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bounds(self, command_buffer, min_depth_bounds, max_depth_bounds) }
}
}
/// Call `vkCmdSetStencilCompareMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilCompareMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_stencil_compare_mask(
device: &Device,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
compare_mask: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_compare_mask
.ok_or(CallError::MissingCommand("vkCmdSetStencilCompareMask"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, face_mask, compare_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilCompareMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilCompareMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_stencil_compare_mask(
&self,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
compare_mask: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_stencil_compare_mask(self, command_buffer, face_mask, compare_mask) }
}
}
/// Call `vkCmdSetStencilWriteMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilWriteMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_stencil_write_mask(
device: &Device,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
write_mask: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_write_mask
.ok_or(CallError::MissingCommand("vkCmdSetStencilWriteMask"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, face_mask, write_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilWriteMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilWriteMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_stencil_write_mask(
&self,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
write_mask: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_stencil_write_mask(self, command_buffer, face_mask, write_mask) }
}
}
/// Call `vkCmdSetStencilReference` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilReference` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_stencil_reference(
device: &Device,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
reference: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_reference
.ok_or(CallError::MissingCommand("vkCmdSetStencilReference"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, face_mask, reference) };
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilReference` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilReference` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_stencil_reference(
&self,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
reference: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_stencil_reference(self, command_buffer, face_mask, reference) }
}
}
/// Call `vkCmdBindDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_bind_descriptor_sets(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
first_set: u32,
descriptor_sets: &[vk::DescriptorSet],
dynamic_offsets: &[u32],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_sets
.ok_or(CallError::MissingCommand("vkCmdBindDescriptorSets"))?;
let descriptor_set_count = u32::try_from(descriptor_sets.len())
.map_err(|_| CallError::CountOverflow(descriptor_sets.len()))?;
let dynamic_offset_count = u32::try_from(dynamic_offsets.len())
.map_err(|_| CallError::CountOverflow(dynamic_offsets.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
pipeline_bind_point,
layout,
first_set,
descriptor_set_count,
descriptor_sets.as_ptr(),
dynamic_offset_count,
dynamic_offsets.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorSets` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_bind_descriptor_sets(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
first_set: u32,
descriptor_sets: &[vk::DescriptorSet],
dynamic_offsets: &[u32],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_descriptor_sets(
self,
command_buffer,
pipeline_bind_point,
layout,
first_set,
descriptor_sets,
dynamic_offsets,
)
}
}
}
/// Call `vkCmdBindIndexBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_bind_index_buffer(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_index_buffer
.ok_or(CallError::MissingCommand("vkCmdBindIndexBuffer"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, index_type) };
Ok(())
}
impl Device {
/// Call `vkCmdBindIndexBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_bind_index_buffer(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_index_buffer(self, command_buffer, buffer, offset, index_type) }
}
}
/// Call `vkCmdBindVertexBuffers` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_bind_vertex_buffers(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
buffers: &[vk::Buffer],
offsets: &[vk::DeviceSize],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_vertex_buffers
.ok_or(CallError::MissingCommand("vkCmdBindVertexBuffers"))?;
let binding_count =
u32::try_from(buffers.len()).map_err(|_| CallError::CountOverflow(buffers.len()))?;
if offsets.len() != buffers.len() {
return Err(CallError::SliceLengthMismatch {
parameter: "offsets",
expected: buffers.len(),
actual: offsets.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
buffers.as_ptr(),
offsets.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindVertexBuffers` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_bind_vertex_buffers(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
buffers: &[vk::Buffer],
offsets: &[vk::DeviceSize],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_vertex_buffers(self, command_buffer, first_binding, buffers, offsets) }
}
}
/// Call `vkCmdDraw` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDraw` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_draw(
device: &Device,
command_buffer: vk::CommandBuffer,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw
.ok_or(CallError::MissingCommand("vkCmdDraw"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
vertex_count,
instance_count,
first_vertex,
first_instance,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDraw` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDraw` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_draw(
&self,
command_buffer: vk::CommandBuffer,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw(
self,
command_buffer,
vertex_count,
instance_count,
first_vertex,
first_instance,
)
}
}
}
/// Call `vkCmdDrawIndexed` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexed` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_draw_indexed(
device: &Device,
command_buffer: vk::CommandBuffer,
index_count: u32,
instance_count: u32,
first_index: u32,
vertex_offset: i32,
first_instance: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indexed
.ok_or(CallError::MissingCommand("vkCmdDrawIndexed"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
index_count,
instance_count,
first_index,
vertex_offset,
first_instance,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexed` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexed` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_draw_indexed(
&self,
command_buffer: vk::CommandBuffer,
index_count: u32,
instance_count: u32,
first_index: u32,
vertex_offset: i32,
first_instance: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indexed(
self,
command_buffer,
index_count,
instance_count,
first_index,
vertex_offset,
first_instance,
)
}
}
}
/// Call `vkCmdDrawMultiEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMultiEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_multi_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
draw_count: u32,
p_vertex_info: *const vk::MultiDrawInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_multi_ext
.ok_or(CallError::MissingCommand("vkCmdDrawMultiEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
draw_count,
p_vertex_info,
instance_count,
first_instance,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawMultiEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMultiEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_multi_ext(
&self,
command_buffer: vk::CommandBuffer,
draw_count: u32,
p_vertex_info: *const vk::MultiDrawInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_multi_ext(
self,
command_buffer,
draw_count,
p_vertex_info,
instance_count,
first_instance,
stride,
)
}
}
}
/// Call `vkCmdDrawMultiIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMultiIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_multi_indexed_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
draw_count: u32,
p_index_info: *const vk::MultiDrawIndexedInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
p_vertex_offset: *const i32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_multi_indexed_ext
.ok_or(CallError::MissingCommand("vkCmdDrawMultiIndexedEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
draw_count,
p_index_info,
instance_count,
first_instance,
stride,
p_vertex_offset,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawMultiIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMultiIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_multi_indexed_ext(
&self,
command_buffer: vk::CommandBuffer,
draw_count: u32,
p_index_info: *const vk::MultiDrawIndexedInfoEXT,
instance_count: u32,
first_instance: u32,
stride: u32,
p_vertex_offset: *const i32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_multi_indexed_ext(
self,
command_buffer,
draw_count,
p_index_info,
instance_count,
first_instance,
stride,
p_vertex_offset,
)
}
}
}
/// Call `vkCmdDrawIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_draw_indirect(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect
.ok_or(CallError::MissingCommand("vkCmdDrawIndirect"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, draw_count, stride) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_draw_indirect(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indirect(self, command_buffer, buffer, offset, draw_count, stride) }
}
}
/// Call `vkCmdDrawIndexedIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_draw_indexed_indirect(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indexed_indirect
.ok_or(CallError::MissingCommand("vkCmdDrawIndexedIndirect"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, draw_count, stride) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indexed_indirect(self, command_buffer, buffer, offset, draw_count, stride) }
}
}
/// Call `vkCmdDispatchIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_dispatch_indirect(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_indirect
.ok_or(CallError::MissingCommand("vkCmdDispatchIndirect"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset) };
Ok(())
}
impl Device {
/// Call `vkCmdDispatchIndirect` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchIndirect` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_dispatch_indirect(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_dispatch_indirect(self, command_buffer, buffer, offset) }
}
}
/// Call `vkCmdSubpassShadingHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSubpassShadingHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_subpass_shading_huawei(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_subpass_shading_huawei
.ok_or(CallError::MissingCommand("vkCmdSubpassShadingHUAWEI"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdSubpassShadingHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSubpassShadingHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_subpass_shading_huawei(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_subpass_shading_huawei(self, command_buffer) }
}
}
/// Call `vkCmdDrawClusterHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawClusterHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_cluster_huawei(
device: &Device,
command_buffer: vk::CommandBuffer,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_cluster_huawei
.ok_or(CallError::MissingCommand("vkCmdDrawClusterHUAWEI"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, group_count_x, group_count_y, group_count_z) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawClusterHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawClusterHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_cluster_huawei(
&self,
command_buffer: vk::CommandBuffer,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_cluster_huawei(
self,
command_buffer,
group_count_x,
group_count_y,
group_count_z,
)
}
}
}
/// Call `vkCmdDrawClusterIndirectHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawClusterIndirectHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_cluster_indirect_huawei(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_cluster_indirect_huawei
.ok_or(CallError::MissingCommand("vkCmdDrawClusterIndirectHUAWEI"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawClusterIndirectHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawClusterIndirectHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_cluster_indirect_huawei(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_cluster_indirect_huawei(self, command_buffer, buffer, offset) }
}
}
/// Call `vkCmdUpdatePipelineIndirectBufferNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdatePipelineIndirectBufferNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_update_pipeline_indirect_buffer_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_update_pipeline_indirect_buffer_nv
.ok_or(CallError::MissingCommand(
"vkCmdUpdatePipelineIndirectBufferNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_bind_point, pipeline) };
Ok(())
}
impl Device {
/// Call `vkCmdUpdatePipelineIndirectBufferNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdatePipelineIndirectBufferNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_update_pipeline_indirect_buffer_nv(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_update_pipeline_indirect_buffer_nv(self, command_buffer, pipeline_bind_point, pipeline)
}
}
}
/// Call `vkCmdCopyBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer(
device: &Device,
command_buffer: vk::CommandBuffer,
src_buffer: vk::Buffer,
dst_buffer: vk::Buffer,
regions: &[vk::BufferCopy],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer
.ok_or(CallError::MissingCommand("vkCmdCopyBuffer"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_buffer,
dst_buffer,
region_count,
regions.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer(
&self,
command_buffer: vk::CommandBuffer,
src_buffer: vk::Buffer,
dst_buffer: vk::Buffer,
regions: &[vk::BufferCopy],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_buffer(self, command_buffer, src_buffer, dst_buffer, regions) }
}
}
/// Call `vkCmdCopyImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image(
device: &Device,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageCopy],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image
.ok_or(CallError::MissingCommand("vkCmdCopyImage"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
region_count,
regions.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image(
&self,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageCopy],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_image(
self,
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
regions,
)
}
}
}
/// Call `vkCmdBlitImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_blit_image(
device: &Device,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageBlit],
filter: vk::Filter,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_blit_image
.ok_or(CallError::MissingCommand("vkCmdBlitImage"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
region_count,
regions.as_ptr(),
filter,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBlitImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_blit_image(
&self,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageBlit],
filter: vk::Filter,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_blit_image(
self,
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
regions,
filter,
)
}
}
}
/// Call `vkCmdCopyBufferToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer_to_image(
device: &Device,
command_buffer: vk::CommandBuffer,
src_buffer: vk::Buffer,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::BufferImageCopy],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer_to_image
.ok_or(CallError::MissingCommand("vkCmdCopyBufferToImage"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_buffer,
dst_image,
dst_image_layout,
region_count,
regions.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyBufferToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer_to_image(
&self,
command_buffer: vk::CommandBuffer,
src_buffer: vk::Buffer,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::BufferImageCopy],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_buffer_to_image(
self,
command_buffer,
src_buffer,
dst_image,
dst_image_layout,
regions,
)
}
}
}
/// Call `vkCmdCopyImageToBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image_to_buffer(
device: &Device,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_buffer: vk::Buffer,
regions: &[vk::BufferImageCopy],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image_to_buffer
.ok_or(CallError::MissingCommand("vkCmdCopyImageToBuffer"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_image,
src_image_layout,
dst_buffer,
region_count,
regions.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyImageToBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image_to_buffer(
&self,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_buffer: vk::Buffer,
regions: &[vk::BufferImageCopy],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_image_to_buffer(
self,
command_buffer,
src_image,
src_image_layout,
dst_buffer,
regions,
)
}
}
}
/// Call `vkCmdCopyMemoryIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_indirect_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_address: vk::DeviceAddress,
copy_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_indirect_nv
.ok_or(CallError::MissingCommand("vkCmdCopyMemoryIndirectNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_buffer_address, copy_count, stride) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_indirect_nv(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_address: vk::DeviceAddress,
copy_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_memory_indirect_nv(
self,
command_buffer,
copy_buffer_address,
copy_count,
stride,
)
}
}
}
/// Call `vkCmdCopyMemoryIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_indirect_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_memory_indirect_info: *const vk::CopyMemoryIndirectInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_indirect_khr
.ok_or(CallError::MissingCommand("vkCmdCopyMemoryIndirectKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_memory_indirect_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_indirect_khr(
&self,
command_buffer: vk::CommandBuffer,
p_copy_memory_indirect_info: *const vk::CopyMemoryIndirectInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_memory_indirect_khr(self, command_buffer, p_copy_memory_indirect_info) }
}
}
/// Call `vkCmdCopyMemoryToImageIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_copy_memory_to_image_indirect_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_address: vk::DeviceAddress,
copy_count: u32,
stride: u32,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
p_image_subresources: *const vk::ImageSubresourceLayers,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_copy_memory_to_image_indirect_nv
.ok_or(CallError::MissingCommand(
"vkCmdCopyMemoryToImageIndirectNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
copy_buffer_address,
copy_count,
stride,
dst_image,
dst_image_layout,
p_image_subresources,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryToImageIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_copy_memory_to_image_indirect_nv(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_address: vk::DeviceAddress,
copy_count: u32,
stride: u32,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
p_image_subresources: *const vk::ImageSubresourceLayers,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_memory_to_image_indirect_nv(
self,
command_buffer,
copy_buffer_address,
copy_count,
stride,
dst_image,
dst_image_layout,
p_image_subresources,
)
}
}
}
/// Call `vkCmdCopyMemoryToImageIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_to_image_indirect_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_memory_to_image_indirect_info: *const vk::CopyMemoryToImageIndirectInfoKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_copy_memory_to_image_indirect_khr
.ok_or(CallError::MissingCommand(
"vkCmdCopyMemoryToImageIndirectKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_memory_to_image_indirect_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryToImageIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_to_image_indirect_khr(
&self,
command_buffer: vk::CommandBuffer,
p_copy_memory_to_image_indirect_info: *const vk::CopyMemoryToImageIndirectInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_memory_to_image_indirect_khr(
self,
command_buffer,
p_copy_memory_to_image_indirect_info,
)
}
}
}
/// Call `vkCmdUpdateBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdateBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
pub unsafe fn cmd_update_buffer(
device: &Device,
command_buffer: vk::CommandBuffer,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
data: &[u8],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_update_buffer
.ok_or(CallError::MissingCommand("vkCmdUpdateBuffer"))?;
let data_size =
vk::DeviceSize::try_from(data.len()).map_err(|_| CallError::CountOverflow(data.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
dst_buffer,
dst_offset,
data_size,
data.as_ptr().cast(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdUpdateBuffer` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdateBuffer` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
#[inline]
pub unsafe fn cmd_update_buffer(
&self,
command_buffer: vk::CommandBuffer,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
data: &[u8],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_update_buffer(self, command_buffer, dst_buffer, dst_offset, data) }
}
}
/// Call `vkCmdClearColorImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearColorImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_clear_color_image(
device: &Device,
command_buffer: vk::CommandBuffer,
image: vk::Image,
image_layout: vk::ImageLayout,
color: &vk::ClearColorValue,
ranges: &[vk::ImageSubresourceRange],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_clear_color_image
.ok_or(CallError::MissingCommand("vkCmdClearColorImage"))?;
let range_count =
u32::try_from(ranges.len()).map_err(|_| CallError::CountOverflow(ranges.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
image,
image_layout,
color,
range_count,
ranges.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdClearColorImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearColorImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_clear_color_image(
&self,
command_buffer: vk::CommandBuffer,
image: vk::Image,
image_layout: vk::ImageLayout,
color: &vk::ClearColorValue,
ranges: &[vk::ImageSubresourceRange],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_clear_color_image(self, command_buffer, image, image_layout, color, ranges) }
}
}
/// Call `vkCmdClearDepthStencilImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearDepthStencilImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_clear_depth_stencil_image(
device: &Device,
command_buffer: vk::CommandBuffer,
image: vk::Image,
image_layout: vk::ImageLayout,
depth_stencil: &vk::ClearDepthStencilValue,
ranges: &[vk::ImageSubresourceRange],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_clear_depth_stencil_image
.ok_or(CallError::MissingCommand("vkCmdClearDepthStencilImage"))?;
let range_count =
u32::try_from(ranges.len()).map_err(|_| CallError::CountOverflow(ranges.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
image,
image_layout,
depth_stencil,
range_count,
ranges.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdClearDepthStencilImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearDepthStencilImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_clear_depth_stencil_image(
&self,
command_buffer: vk::CommandBuffer,
image: vk::Image,
image_layout: vk::ImageLayout,
depth_stencil: &vk::ClearDepthStencilValue,
ranges: &[vk::ImageSubresourceRange],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_clear_depth_stencil_image(
self,
command_buffer,
image,
image_layout,
depth_stencil,
ranges,
)
}
}
}
/// Call `vkCmdClearAttachments` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearAttachments` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_clear_attachments(
device: &Device,
command_buffer: vk::CommandBuffer,
attachments: &[vk::ClearAttachment],
rects: &[vk::ClearRect],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_clear_attachments
.ok_or(CallError::MissingCommand("vkCmdClearAttachments"))?;
let attachment_count =
u32::try_from(attachments.len()).map_err(|_| CallError::CountOverflow(attachments.len()))?;
let rect_count = u32::try_from(rects.len()).map_err(|_| CallError::CountOverflow(rects.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
attachment_count,
attachments.as_ptr(),
rect_count,
rects.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdClearAttachments` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdClearAttachments` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_clear_attachments(
&self,
command_buffer: vk::CommandBuffer,
attachments: &[vk::ClearAttachment],
rects: &[vk::ClearRect],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_clear_attachments(self, command_buffer, attachments, rects) }
}
}
/// Call `vkCmdResolveImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_resolve_image(
device: &Device,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageResolve],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_resolve_image
.ok_or(CallError::MissingCommand("vkCmdResolveImage"))?;
let region_count =
u32::try_from(regions.len()).map_err(|_| CallError::CountOverflow(regions.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
region_count,
regions.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdResolveImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_resolve_image(
&self,
command_buffer: vk::CommandBuffer,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
regions: &[vk::ImageResolve],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_resolve_image(
self,
command_buffer,
src_image,
src_image_layout,
dst_image,
dst_image_layout,
regions,
)
}
}
}
/// Call `vkCmdSetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_event(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_event
.ok_or(CallError::MissingCommand("vkCmdSetEvent"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, stage_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_event(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_event(self, command_buffer, event, stage_mask) }
}
}
/// Call `vkCmdResetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_reset_event(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_reset_event
.ok_or(CallError::MissingCommand("vkCmdResetEvent"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, stage_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdResetEvent` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_reset_event(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_reset_event(self, command_buffer, event, stage_mask) }
}
}
/// Call `vkCmdWaitEvents` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_wait_events(
device: &Device,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
src_stage_mask: vk::PipelineStageFlags,
dst_stage_mask: vk::PipelineStageFlags,
memory_barriers: &[vk::MemoryBarrier],
buffer_memory_barriers: &[vk::BufferMemoryBarrier],
image_memory_barriers: &[vk::ImageMemoryBarrier],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_wait_events
.ok_or(CallError::MissingCommand("vkCmdWaitEvents"))?;
let event_count =
u32::try_from(events.len()).map_err(|_| CallError::CountOverflow(events.len()))?;
let memory_barrier_count = u32::try_from(memory_barriers.len())
.map_err(|_| CallError::CountOverflow(memory_barriers.len()))?;
let buffer_memory_barrier_count = u32::try_from(buffer_memory_barriers.len())
.map_err(|_| CallError::CountOverflow(buffer_memory_barriers.len()))?;
let image_memory_barrier_count = u32::try_from(image_memory_barriers.len())
.map_err(|_| CallError::CountOverflow(image_memory_barriers.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
event_count,
events.as_ptr(),
src_stage_mask,
dst_stage_mask,
memory_barrier_count,
memory_barriers.as_ptr(),
buffer_memory_barrier_count,
buffer_memory_barriers.as_ptr(),
image_memory_barrier_count,
image_memory_barriers.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWaitEvents` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_wait_events(
&self,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
src_stage_mask: vk::PipelineStageFlags,
dst_stage_mask: vk::PipelineStageFlags,
memory_barriers: &[vk::MemoryBarrier],
buffer_memory_barriers: &[vk::BufferMemoryBarrier],
image_memory_barriers: &[vk::ImageMemoryBarrier],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_wait_events(
self,
command_buffer,
events,
src_stage_mask,
dst_stage_mask,
memory_barriers,
buffer_memory_barriers,
image_memory_barriers,
)
}
}
}
/// Call `vkCmdPipelineBarrier` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_pipeline_barrier(
device: &Device,
command_buffer: vk::CommandBuffer,
src_stage_mask: vk::PipelineStageFlags,
dst_stage_mask: vk::PipelineStageFlags,
dependency_flags: vk::DependencyFlags,
memory_barriers: &[vk::MemoryBarrier],
buffer_memory_barriers: &[vk::BufferMemoryBarrier],
image_memory_barriers: &[vk::ImageMemoryBarrier],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_pipeline_barrier
.ok_or(CallError::MissingCommand("vkCmdPipelineBarrier"))?;
let memory_barrier_count = u32::try_from(memory_barriers.len())
.map_err(|_| CallError::CountOverflow(memory_barriers.len()))?;
let buffer_memory_barrier_count = u32::try_from(buffer_memory_barriers.len())
.map_err(|_| CallError::CountOverflow(buffer_memory_barriers.len()))?;
let image_memory_barrier_count = u32::try_from(image_memory_barriers.len())
.map_err(|_| CallError::CountOverflow(image_memory_barriers.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
src_stage_mask,
dst_stage_mask,
dependency_flags,
memory_barrier_count,
memory_barriers.as_ptr(),
buffer_memory_barrier_count,
buffer_memory_barriers.as_ptr(),
image_memory_barrier_count,
image_memory_barriers.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPipelineBarrier` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_pipeline_barrier(
&self,
command_buffer: vk::CommandBuffer,
src_stage_mask: vk::PipelineStageFlags,
dst_stage_mask: vk::PipelineStageFlags,
dependency_flags: vk::DependencyFlags,
memory_barriers: &[vk::MemoryBarrier],
buffer_memory_barriers: &[vk::BufferMemoryBarrier],
image_memory_barriers: &[vk::ImageMemoryBarrier],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_pipeline_barrier(
self,
command_buffer,
src_stage_mask,
dst_stage_mask,
dependency_flags,
memory_barriers,
buffer_memory_barriers,
image_memory_barriers,
)
}
}
}
/// Call `vkCmdBeginQuery` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginQuery` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_begin_query(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
flags: vk::QueryControlFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_query
.ok_or(CallError::MissingCommand("vkCmdBeginQuery"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, query_pool, query, flags) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginQuery` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginQuery` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_begin_query(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
flags: vk::QueryControlFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_query(self, command_buffer, query_pool, query, flags) }
}
}
/// Call `vkCmdEndQuery` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndQuery` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_end_query(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_query
.ok_or(CallError::MissingCommand("vkCmdEndQuery"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, query_pool, query) };
Ok(())
}
impl Device {
/// Call `vkCmdEndQuery` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndQuery` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_end_query(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_query(self, command_buffer, query_pool, query) }
}
}
/// Call `vkCmdBeginConditionalRenderingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginConditionalRenderingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_conditional_rendering_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_conditional_rendering_begin: *const vk::ConditionalRenderingBeginInfoEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_begin_conditional_rendering_ext
.ok_or(CallError::MissingCommand(
"vkCmdBeginConditionalRenderingEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_conditional_rendering_begin) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginConditionalRenderingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginConditionalRenderingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_conditional_rendering_ext(
&self,
command_buffer: vk::CommandBuffer,
p_conditional_rendering_begin: *const vk::ConditionalRenderingBeginInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_conditional_rendering_ext(self, command_buffer, p_conditional_rendering_begin)
}
}
}
/// Call `vkCmdEndConditionalRenderingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndConditionalRenderingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_conditional_rendering_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_conditional_rendering_ext
.ok_or(CallError::MissingCommand("vkCmdEndConditionalRenderingEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndConditionalRenderingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndConditionalRenderingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_conditional_rendering_ext(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_conditional_rendering_ext(self, command_buffer) }
}
}
/// Call `vkCmdBeginCustomResolveEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginCustomResolveEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_custom_resolve_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_begin_custom_resolve_info: *const vk::BeginCustomResolveInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_custom_resolve_ext
.ok_or(CallError::MissingCommand("vkCmdBeginCustomResolveEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_begin_custom_resolve_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginCustomResolveEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginCustomResolveEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_custom_resolve_ext(
&self,
command_buffer: vk::CommandBuffer,
p_begin_custom_resolve_info: *const vk::BeginCustomResolveInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_custom_resolve_ext(self, command_buffer, p_begin_custom_resolve_info) }
}
}
/// Call `vkCmdResetQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_reset_query_pool(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_reset_query_pool
.ok_or(CallError::MissingCommand("vkCmdResetQueryPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, query_pool, first_query, query_count) };
Ok(())
}
impl Device {
/// Call `vkCmdResetQueryPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetQueryPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_reset_query_pool(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_reset_query_pool(self, command_buffer, query_pool, first_query, query_count) }
}
}
/// Call `vkCmdWriteTimestamp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_write_timestamp(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_stage: vk::PipelineStageFlagBits,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_timestamp
.ok_or(CallError::MissingCommand("vkCmdWriteTimestamp"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_stage, query_pool, query) };
Ok(())
}
impl Device {
/// Call `vkCmdWriteTimestamp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_write_timestamp(
&self,
command_buffer: vk::CommandBuffer,
pipeline_stage: vk::PipelineStageFlagBits,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_write_timestamp(self, command_buffer, pipeline_stage, query_pool, query) }
}
}
/// Call `vkCmdCopyQueryPoolResults` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyQueryPoolResults` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_copy_query_pool_results(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
stride: vk::DeviceSize,
flags: vk::QueryResultFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_query_pool_results
.ok_or(CallError::MissingCommand("vkCmdCopyQueryPoolResults"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
query_pool,
first_query,
query_count,
dst_buffer,
dst_offset,
stride,
flags,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyQueryPoolResults` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyQueryPoolResults` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_copy_query_pool_results(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
stride: vk::DeviceSize,
flags: vk::QueryResultFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_query_pool_results(
self,
command_buffer,
query_pool,
first_query,
query_count,
dst_buffer,
dst_offset,
stride,
flags,
)
}
}
}
/// Call `vkCmdPushConstants` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
pub unsafe fn cmd_push_constants(
device: &Device,
command_buffer: vk::CommandBuffer,
layout: vk::PipelineLayout,
stage_flags: vk::ShaderStageFlags,
offset: u32,
values: &[u8],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_constants
.ok_or(CallError::MissingCommand("vkCmdPushConstants"))?;
let size = u32::try_from(values.len()).map_err(|_| CallError::CountOverflow(values.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
layout,
stage_flags,
offset,
size,
values.as_ptr().cast(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPushConstants` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Byte slices determine native byte counts. The caller must also satisfy the
/// command's data alignment, format, size-multiple and stride requirements;
/// a byte slice alone does not establish those properties.
#[inline]
pub unsafe fn cmd_push_constants(
&self,
command_buffer: vk::CommandBuffer,
layout: vk::PipelineLayout,
stage_flags: vk::ShaderStageFlags,
offset: u32,
values: &[u8],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_constants(self, command_buffer, layout, stage_flags, offset, values) }
}
}
/// Call `vkCmdBeginRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_begin_render_pass(
device: &Device,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
contents: vk::SubpassContents,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_render_pass
.ok_or(CallError::MissingCommand("vkCmdBeginRenderPass"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, render_pass_begin, contents) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_begin_render_pass(
&self,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
contents: vk::SubpassContents,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_render_pass(self, command_buffer, render_pass_begin, contents) }
}
}
/// Call `vkCmdNextSubpass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_next_subpass(
device: &Device,
command_buffer: vk::CommandBuffer,
contents: vk::SubpassContents,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_next_subpass
.ok_or(CallError::MissingCommand("vkCmdNextSubpass"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, contents) };
Ok(())
}
impl Device {
/// Call `vkCmdNextSubpass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_next_subpass(
&self,
command_buffer: vk::CommandBuffer,
contents: vk::SubpassContents,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_next_subpass(self, command_buffer, contents) }
}
}
/// Call `vkCmdEndRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_end_render_pass(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_render_pass
.ok_or(CallError::MissingCommand("vkCmdEndRenderPass"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRenderPass` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_end_render_pass(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_render_pass(self, command_buffer) }
}
}
/// Call `vkCmdExecuteCommands` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteCommands` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_execute_commands(
device: &Device,
command_buffer: vk::CommandBuffer,
command_buffers: &[vk::CommandBuffer],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_execute_commands
.ok_or(CallError::MissingCommand("vkCmdExecuteCommands"))?;
let command_buffer_count = u32::try_from(command_buffers.len())
.map_err(|_| CallError::CountOverflow(command_buffers.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
command_buffer_count,
command_buffers.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdExecuteCommands` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteCommands` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_execute_commands(
&self,
command_buffer: vk::CommandBuffer,
command_buffers: &[vk::CommandBuffer],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_execute_commands(self, command_buffer, command_buffers) }
}
}
#[cfg(feature = "platform-android")]
/// Call `vkCreateAndroidSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAndroidSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_android_surface_khr(
instance: &Instance,
p_create_info: *const vk::AndroidSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_android_surface_khr
.ok_or(CallError::MissingCommand("vkCreateAndroidSurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-android")]
impl Instance {
/// Call `vkCreateAndroidSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAndroidSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_android_surface_khr(
&self,
p_create_info: *const vk::AndroidSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_android_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-ohos")]
/// Call `vkCreateSurfaceOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSurfaceOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_surface_ohos(
instance: &Instance,
p_create_info: *const vk::SurfaceCreateInfoOHOS,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_surface_ohos
.ok_or(CallError::MissingCommand("vkCreateSurfaceOHOS"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ohos")]
impl Instance {
/// Call `vkCreateSurfaceOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSurfaceOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_surface_ohos(
&self,
p_create_info: *const vk::SurfaceCreateInfoOHOS,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_surface_ohos(self, p_create_info, p_allocator, p_surface) }
}
}
/// Call `vkGetPhysicalDeviceDisplayPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_display_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_display_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDisplayPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceDisplayPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_display_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_display_properties_khr(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_display_plane_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPlanePropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_display_plane_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDisplayPlanePropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_display_plane_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPlanePropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_display_plane_properties_khr(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetDisplayPlaneSupportedDisplaysKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneSupportedDisplaysKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_display_plane_supported_displays_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
plane_index: u32,
p_display_count: *mut u32,
p_displays: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_display_plane_supported_displays_khr
.ok_or(CallError::MissingCommand(
"vkGetDisplayPlaneSupportedDisplaysKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, plane_index, p_display_count, p_displays) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDisplayPlaneSupportedDisplaysKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneSupportedDisplaysKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_display_plane_supported_displays_khr(
&self,
physical_device: vk::PhysicalDevice,
plane_index: u32,
p_display_count: *mut u32,
p_displays: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_display_plane_supported_displays_khr(
self,
physical_device,
plane_index,
p_display_count,
p_displays,
)
}
}
}
/// Call `vkGetDisplayModePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayModePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_display_mode_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayModePropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_display_mode_properties_khr
.ok_or(CallError::MissingCommand("vkGetDisplayModePropertiesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, display, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDisplayModePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayModePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_display_mode_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayModePropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_display_mode_properties_khr(
self,
physical_device,
display,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkCreateDisplayModeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDisplayModeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_display_mode_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_create_info: *const vk::DisplayModeCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_mode: *mut vk::DisplayModeKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_display_mode_khr
.ok_or(CallError::MissingCommand("vkCreateDisplayModeKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(physical_device, display, p_create_info, p_allocator, p_mode) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkCreateDisplayModeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDisplayModeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_display_mode_khr(
&self,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_create_info: *const vk::DisplayModeCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_mode: *mut vk::DisplayModeKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_display_mode_khr(
self,
physical_device,
display,
p_create_info,
p_allocator,
p_mode,
)
}
}
}
/// Call `vkGetDisplayPlaneCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_display_plane_capabilities_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
mode: vk::DisplayModeKHR,
plane_index: u32,
p_capabilities: *mut vk::DisplayPlaneCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
instance
.fp()
.get_display_plane_capabilities_khr
.ok_or(CallError::MissingCommand(
"vkGetDisplayPlaneCapabilitiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, mode, plane_index, p_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDisplayPlaneCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_display_plane_capabilities_khr(
&self,
physical_device: vk::PhysicalDevice,
mode: vk::DisplayModeKHR,
plane_index: u32,
p_capabilities: *mut vk::DisplayPlaneCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_display_plane_capabilities_khr(self, physical_device, mode, plane_index, p_capabilities)
}
}
}
/// Call `vkCreateDisplayPlaneSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDisplayPlaneSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_display_plane_surface_khr(
instance: &Instance,
p_create_info: *const vk::DisplaySurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_display_plane_surface_khr
.ok_or(CallError::MissingCommand("vkCreateDisplayPlaneSurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkCreateDisplayPlaneSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDisplayPlaneSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_display_plane_surface_khr(
&self,
p_create_info: *const vk::DisplaySurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_display_plane_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
/// Call `vkCreateSharedSwapchainsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSharedSwapchainsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_shared_swapchains_khr(
device: &Device,
swapchain_count: u32,
p_create_infos: *const vk::SwapchainCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_swapchains: *mut vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_shared_swapchains_khr
.ok_or(CallError::MissingCommand("vkCreateSharedSwapchainsKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain_count,
p_create_infos,
p_allocator,
p_swapchains,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateSharedSwapchainsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSharedSwapchainsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_shared_swapchains_khr(
&self,
swapchain_count: u32,
p_create_infos: *const vk::SwapchainCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_swapchains: *mut vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_shared_swapchains_khr(
self,
swapchain_count,
p_create_infos,
p_allocator,
p_swapchains,
)
}
}
}
/// Call `vkDestroySurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_surface_khr(
instance: &Instance,
surface: vk::SurfaceKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.destroy_surface_khr
.ok_or(CallError::MissingCommand("vkDestroySurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(instance.handle(), surface, p_allocator) };
Ok(())
}
impl Instance {
/// Call `vkDestroySurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_surface_khr(
&self,
surface: vk::SurfaceKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_surface_khr(self, surface, p_allocator) }
}
}
/// Call `vkGetPhysicalDeviceSurfaceSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_support_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
surface: vk::SurfaceKHR,
p_supported: *mut vk::Bool32,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_support_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, surface, p_supported) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_support_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
surface: vk::SurfaceKHR,
p_supported: *mut vk::Bool32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_support_khr(
self,
physical_device,
queue_family_index,
surface,
p_supported,
)
}
}
}
/// Call `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_capabilities_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_capabilities: *mut vk::SurfaceCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_capabilities_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, surface, p_surface_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_capabilities_khr(
&self,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_capabilities: *mut vk::SurfaceCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_capabilities_khr(
self,
physical_device,
surface,
p_surface_capabilities,
)
}
}
}
/// Call `vkGetPhysicalDeviceSurfaceFormatsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceFormatsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_formats_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_format_count: *mut u32,
p_surface_formats: *mut vk::SurfaceFormatKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_formats_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceFormatsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
surface,
p_surface_format_count,
p_surface_formats,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceFormatsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceFormatsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_formats_khr(
&self,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_format_count: *mut u32,
p_surface_formats: *mut vk::SurfaceFormatKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_formats_khr(
self,
physical_device,
surface,
p_surface_format_count,
p_surface_formats,
)
}
}
}
/// Call `vkGetPhysicalDeviceSurfacePresentModesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfacePresentModesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_present_modes_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_present_mode_count: *mut u32,
p_present_modes: *mut vk::PresentModeKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_present_modes_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfacePresentModesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
surface,
p_present_mode_count,
p_present_modes,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfacePresentModesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfacePresentModesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_present_modes_khr(
&self,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_present_mode_count: *mut u32,
p_present_modes: *mut vk::PresentModeKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_present_modes_khr(
self,
physical_device,
surface,
p_present_mode_count,
p_present_modes,
)
}
}
}
/// Call `vkCreateSwapchainKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSwapchainKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_swapchain_khr(
device: &Device,
p_create_info: *const vk::SwapchainCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_swapchain: *mut vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_swapchain_khr
.ok_or(CallError::MissingCommand("vkCreateSwapchainKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_swapchain) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateSwapchainKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSwapchainKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_swapchain_khr(
&self,
p_create_info: *const vk::SwapchainCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_swapchain: *mut vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_swapchain_khr(self, p_create_info, p_allocator, p_swapchain) }
}
}
/// Call `vkDestroySwapchainKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySwapchainKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_swapchain_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_swapchain_khr
.ok_or(CallError::MissingCommand("vkDestroySwapchainKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), swapchain, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroySwapchainKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySwapchainKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_swapchain_khr(
&self,
swapchain: vk::SwapchainKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_swapchain_khr(self, swapchain, p_allocator) }
}
}
/// Call `vkGetSwapchainImagesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainImagesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_swapchain_images_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
p_swapchain_image_count: *mut u32,
p_swapchain_images: *mut vk::Image,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_swapchain_images_khr
.ok_or(CallError::MissingCommand("vkGetSwapchainImagesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain,
p_swapchain_image_count,
p_swapchain_images,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSwapchainImagesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainImagesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_swapchain_images_khr(
&self,
swapchain: vk::SwapchainKHR,
p_swapchain_image_count: *mut u32,
p_swapchain_images: *mut vk::Image,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_swapchain_images_khr(self, swapchain, p_swapchain_image_count, p_swapchain_images)
}
}
}
/// Call `vkAcquireNextImageKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireNextImageKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_next_image_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
timeout: u64,
semaphore: vk::Semaphore,
fence: vk::Fence,
p_image_index: *mut u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.acquire_next_image_khr
.ok_or(CallError::MissingCommand("vkAcquireNextImageKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain,
timeout,
semaphore,
fence,
p_image_index,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkAcquireNextImageKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireNextImageKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_next_image_khr(
&self,
swapchain: vk::SwapchainKHR,
timeout: u64,
semaphore: vk::Semaphore,
fence: vk::Fence,
p_image_index: *mut u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_next_image_khr(self, swapchain, timeout, semaphore, fence, p_image_index) }
}
}
/// Call `vkQueuePresentKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueuePresentKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_present_khr(
device: &Device,
queue: vk::Queue,
p_present_info: *const vk::PresentInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.queue_present_khr
.ok_or(CallError::MissingCommand("vkQueuePresentKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, p_present_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkQueuePresentKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueuePresentKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_present_khr(
&self,
queue: vk::Queue,
p_present_info: *const vk::PresentInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_present_khr(self, queue, p_present_info) }
}
}
#[cfg(feature = "platform-vi")]
/// Call `vkCreateViSurfaceNN` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateViSurfaceNN` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_vi_surface_nn(
instance: &Instance,
p_create_info: *const vk::ViSurfaceCreateInfoNN,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_vi_surface_nn
.ok_or(CallError::MissingCommand("vkCreateViSurfaceNN"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-vi")]
impl Instance {
/// Call `vkCreateViSurfaceNN` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateViSurfaceNN` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_vi_surface_nn(
&self,
p_create_info: *const vk::ViSurfaceCreateInfoNN,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_vi_surface_nn(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-wayland")]
/// Call `vkCreateWaylandSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateWaylandSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_wayland_surface_khr(
instance: &Instance,
p_create_info: *const vk::WaylandSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_wayland_surface_khr
.ok_or(CallError::MissingCommand("vkCreateWaylandSurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-wayland")]
impl Instance {
/// Call `vkCreateWaylandSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateWaylandSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_wayland_surface_khr(
&self,
p_create_info: *const vk::WaylandSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_wayland_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-wayland")]
/// Call `vkGetPhysicalDeviceWaylandPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceWaylandPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_wayland_presentation_support_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
display: *mut vk::wl_display,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_wayland_presentation_support_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceWaylandPresentationSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, display) };
Ok(result)
}
#[cfg(feature = "platform-wayland")]
impl Instance {
/// Call `vkGetPhysicalDeviceWaylandPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceWaylandPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_wayland_presentation_support_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
display: *mut vk::wl_display,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_wayland_presentation_support_khr(
self,
physical_device,
queue_family_index,
display,
)
}
}
}
#[cfg(feature = "platform-ubm")]
/// Call `vkCreateUbmSurfaceSEC` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateUbmSurfaceSEC` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_ubm_surface_sec(
instance: &Instance,
p_create_info: *const vk::UbmSurfaceCreateInfoSEC,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_ubm_surface_sec
.ok_or(CallError::MissingCommand("vkCreateUbmSurfaceSEC"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ubm")]
impl Instance {
/// Call `vkCreateUbmSurfaceSEC` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateUbmSurfaceSEC` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_ubm_surface_sec(
&self,
p_create_info: *const vk::UbmSurfaceCreateInfoSEC,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_ubm_surface_sec(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-ubm")]
/// Call `vkGetPhysicalDeviceUbmPresentationSupportSEC` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceUbmPresentationSupportSEC` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_ubm_presentation_support_sec(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
device: *mut vk::ubm_device,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_ubm_presentation_support_sec
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceUbmPresentationSupportSEC",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, device) };
Ok(result)
}
#[cfg(feature = "platform-ubm")]
impl Instance {
/// Call `vkGetPhysicalDeviceUbmPresentationSupportSEC` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceUbmPresentationSupportSEC` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_ubm_presentation_support_sec(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
device: *mut vk::ubm_device,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_ubm_presentation_support_sec(
self,
physical_device,
queue_family_index,
device,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkCreateWin32SurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateWin32SurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_win32_surface_khr(
instance: &Instance,
p_create_info: *const vk::Win32SurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_win32_surface_khr
.ok_or(CallError::MissingCommand("vkCreateWin32SurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Instance {
/// Call `vkCreateWin32SurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateWin32SurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_win32_surface_khr(
&self,
p_create_info: *const vk::Win32SurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_win32_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetPhysicalDeviceWin32PresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceWin32PresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_win32_presentation_support_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_win32_presentation_support_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceWin32PresentationSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index) };
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Instance {
/// Call `vkGetPhysicalDeviceWin32PresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceWin32PresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_win32_presentation_support_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_win32_presentation_support_khr(self, physical_device, queue_family_index)
}
}
}
#[cfg(feature = "platform-xlib")]
/// Call `vkCreateXlibSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateXlibSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_xlib_surface_khr(
instance: &Instance,
p_create_info: *const vk::XlibSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_xlib_surface_khr
.ok_or(CallError::MissingCommand("vkCreateXlibSurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-xlib")]
impl Instance {
/// Call `vkCreateXlibSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateXlibSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_xlib_surface_khr(
&self,
p_create_info: *const vk::XlibSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_xlib_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-xlib")]
/// Call `vkGetPhysicalDeviceXlibPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceXlibPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_xlib_presentation_support_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
dpy: *mut vk::Display,
visual_id: vk::VisualID,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_xlib_presentation_support_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceXlibPresentationSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, dpy, visual_id) };
Ok(result)
}
#[cfg(feature = "platform-xlib")]
impl Instance {
/// Call `vkGetPhysicalDeviceXlibPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceXlibPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_xlib_presentation_support_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
dpy: *mut vk::Display,
visual_id: vk::VisualID,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_xlib_presentation_support_khr(
self,
physical_device,
queue_family_index,
dpy,
visual_id,
)
}
}
}
#[cfg(feature = "platform-xcb")]
/// Call `vkCreateXcbSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateXcbSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_xcb_surface_khr(
instance: &Instance,
p_create_info: *const vk::XcbSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_xcb_surface_khr
.ok_or(CallError::MissingCommand("vkCreateXcbSurfaceKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-xcb")]
impl Instance {
/// Call `vkCreateXcbSurfaceKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateXcbSurfaceKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_xcb_surface_khr(
&self,
p_create_info: *const vk::XcbSurfaceCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_xcb_surface_khr(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-xcb")]
/// Call `vkGetPhysicalDeviceXcbPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceXcbPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_xcb_presentation_support_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
connection: *mut vk::xcb_connection_t,
visual_id: vk::xcb_visualid_t,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_xcb_presentation_support_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceXcbPresentationSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, connection, visual_id) };
Ok(result)
}
#[cfg(feature = "platform-xcb")]
impl Instance {
/// Call `vkGetPhysicalDeviceXcbPresentationSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceXcbPresentationSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_xcb_presentation_support_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
connection: *mut vk::xcb_connection_t,
visual_id: vk::xcb_visualid_t,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_xcb_presentation_support_khr(
self,
physical_device,
queue_family_index,
connection,
visual_id,
)
}
}
}
#[cfg(feature = "platform-directfb")]
/// Call `vkCreateDirectFBSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDirectFBSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_direct_fb_surface_ext(
instance: &Instance,
p_create_info: *const vk::DirectFBSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_direct_fb_surface_ext
.ok_or(CallError::MissingCommand("vkCreateDirectFBSurfaceEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-directfb")]
impl Instance {
/// Call `vkCreateDirectFBSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDirectFBSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_direct_fb_surface_ext(
&self,
p_create_info: *const vk::DirectFBSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_direct_fb_surface_ext(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-directfb")]
/// Call `vkGetPhysicalDeviceDirectFBPresentationSupportEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDirectFBPresentationSupportEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_direct_fb_presentation_support_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
dfb: *mut vk::IDirectFB,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_direct_fb_presentation_support_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDirectFBPresentationSupportEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, dfb) };
Ok(result)
}
#[cfg(feature = "platform-directfb")]
impl Instance {
/// Call `vkGetPhysicalDeviceDirectFBPresentationSupportEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDirectFBPresentationSupportEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_direct_fb_presentation_support_ext(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
dfb: *mut vk::IDirectFB,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_direct_fb_presentation_support_ext(
self,
physical_device,
queue_family_index,
dfb,
)
}
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkCreateImagePipeSurfaceFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImagePipeSurfaceFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_image_pipe_surface_fuchsia(
instance: &Instance,
p_create_info: *const vk::ImagePipeSurfaceCreateInfoFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_image_pipe_surface_fuchsia
.ok_or(CallError::MissingCommand("vkCreateImagePipeSurfaceFUCHSIA"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Instance {
/// Call `vkCreateImagePipeSurfaceFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateImagePipeSurfaceFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_image_pipe_surface_fuchsia(
&self,
p_create_info: *const vk::ImagePipeSurfaceCreateInfoFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_image_pipe_surface_fuchsia(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-ggp")]
/// Call `vkCreateStreamDescriptorSurfaceGGP` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateStreamDescriptorSurfaceGGP` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_stream_descriptor_surface_ggp(
instance: &Instance,
p_create_info: *const vk::StreamDescriptorSurfaceCreateInfoGGP,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
instance
.fp()
.create_stream_descriptor_surface_ggp
.ok_or(CallError::MissingCommand(
"vkCreateStreamDescriptorSurfaceGGP",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ggp")]
impl Instance {
/// Call `vkCreateStreamDescriptorSurfaceGGP` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateStreamDescriptorSurfaceGGP` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_stream_descriptor_surface_ggp(
&self,
p_create_info: *const vk::StreamDescriptorSurfaceCreateInfoGGP,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_stream_descriptor_surface_ggp(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-screen")]
/// Call `vkCreateScreenSurfaceQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateScreenSurfaceQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_screen_surface_qnx(
instance: &Instance,
p_create_info: *const vk::ScreenSurfaceCreateInfoQNX,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_screen_surface_qnx
.ok_or(CallError::MissingCommand("vkCreateScreenSurfaceQNX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-screen")]
impl Instance {
/// Call `vkCreateScreenSurfaceQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateScreenSurfaceQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_screen_surface_qnx(
&self,
p_create_info: *const vk::ScreenSurfaceCreateInfoQNX,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_screen_surface_qnx(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-screen")]
/// Call `vkGetPhysicalDeviceScreenPresentationSupportQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceScreenPresentationSupportQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_screen_presentation_support_qnx(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
window: *mut vk::_screen_window,
) -> Result<vk::Bool32, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_screen_presentation_support_qnx
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceScreenPresentationSupportQNX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, queue_family_index, window) };
Ok(result)
}
#[cfg(feature = "platform-screen")]
impl Instance {
/// Call `vkGetPhysicalDeviceScreenPresentationSupportQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceScreenPresentationSupportQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_screen_presentation_support_qnx(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
window: *mut vk::_screen_window,
) -> Result<vk::Bool32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_screen_presentation_support_qnx(
self,
physical_device,
queue_family_index,
window,
)
}
}
}
/// Call `vkCreateDebugReportCallbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDebugReportCallbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_debug_report_callback_ext(
instance: &Instance,
p_create_info: *const vk::DebugReportCallbackCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_callback: *mut vk::DebugReportCallbackEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_debug_report_callback_ext
.ok_or(CallError::MissingCommand("vkCreateDebugReportCallbackEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_callback) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkCreateDebugReportCallbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDebugReportCallbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_debug_report_callback_ext(
&self,
p_create_info: *const vk::DebugReportCallbackCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_callback: *mut vk::DebugReportCallbackEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_debug_report_callback_ext(self, p_create_info, p_allocator, p_callback) }
}
}
/// Call `vkDestroyDebugReportCallbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDebugReportCallbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_debug_report_callback_ext(
instance: &Instance,
callback: vk::DebugReportCallbackEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.destroy_debug_report_callback_ext
.ok_or(CallError::MissingCommand("vkDestroyDebugReportCallbackEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(instance.handle(), callback, p_allocator) };
Ok(())
}
impl Instance {
/// Call `vkDestroyDebugReportCallbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDebugReportCallbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_debug_report_callback_ext(
&self,
callback: vk::DebugReportCallbackEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_debug_report_callback_ext(self, callback, p_allocator) }
}
}
/// Call `vkDebugReportMessageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugReportMessageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn debug_report_message_ext(
instance: &Instance,
flags: vk::DebugReportFlagsEXT,
object_type: vk::DebugReportObjectTypeEXT,
object: u64,
location: usize,
message_code: i32,
p_layer_prefix: *const std::ffi::c_char,
p_message: *const std::ffi::c_char,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.debug_report_message_ext
.ok_or(CallError::MissingCommand("vkDebugReportMessageEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
instance.handle(),
flags,
object_type,
object,
location,
message_code,
p_layer_prefix,
p_message,
)
};
Ok(())
}
impl Instance {
/// Call `vkDebugReportMessageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugReportMessageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn debug_report_message_ext(
&self,
flags: vk::DebugReportFlagsEXT,
object_type: vk::DebugReportObjectTypeEXT,
object: u64,
location: usize,
message_code: i32,
p_layer_prefix: *const std::ffi::c_char,
p_message: *const std::ffi::c_char,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
debug_report_message_ext(
self,
flags,
object_type,
object,
location,
message_code,
p_layer_prefix,
p_message,
)
}
}
}
/// Call `vkDebugMarkerSetObjectNameEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugMarkerSetObjectNameEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn debug_marker_set_object_name_ext(
device: &Device,
p_name_info: *const vk::DebugMarkerObjectNameInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.debug_marker_set_object_name_ext
.ok_or(CallError::MissingCommand("vkDebugMarkerSetObjectNameEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_name_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkDebugMarkerSetObjectNameEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugMarkerSetObjectNameEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn debug_marker_set_object_name_ext(
&self,
p_name_info: *const vk::DebugMarkerObjectNameInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { debug_marker_set_object_name_ext(self, p_name_info) }
}
}
/// Call `vkDebugMarkerSetObjectTagEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugMarkerSetObjectTagEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn debug_marker_set_object_tag_ext(
device: &Device,
p_tag_info: *const vk::DebugMarkerObjectTagInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.debug_marker_set_object_tag_ext
.ok_or(CallError::MissingCommand("vkDebugMarkerSetObjectTagEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_tag_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkDebugMarkerSetObjectTagEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDebugMarkerSetObjectTagEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn debug_marker_set_object_tag_ext(
&self,
p_tag_info: *const vk::DebugMarkerObjectTagInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { debug_marker_set_object_tag_ext(self, p_tag_info) }
}
}
/// Call `vkCmdDebugMarkerBeginEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerBeginEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_debug_marker_begin_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::DebugMarkerMarkerInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_debug_marker_begin_ext
.ok_or(CallError::MissingCommand("vkCmdDebugMarkerBeginEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_marker_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDebugMarkerBeginEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerBeginEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_debug_marker_begin_ext(
&self,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::DebugMarkerMarkerInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_debug_marker_begin_ext(self, command_buffer, p_marker_info) }
}
}
/// Call `vkCmdDebugMarkerEndEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerEndEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_debug_marker_end_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_debug_marker_end_ext
.ok_or(CallError::MissingCommand("vkCmdDebugMarkerEndEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdDebugMarkerEndEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerEndEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_debug_marker_end_ext(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_debug_marker_end_ext(self, command_buffer) }
}
}
/// Call `vkCmdDebugMarkerInsertEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerInsertEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_debug_marker_insert_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::DebugMarkerMarkerInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_debug_marker_insert_ext
.ok_or(CallError::MissingCommand("vkCmdDebugMarkerInsertEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_marker_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDebugMarkerInsertEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDebugMarkerInsertEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_debug_marker_insert_ext(
&self,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::DebugMarkerMarkerInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_debug_marker_insert_ext(self, command_buffer, p_marker_info) }
}
}
/// Call `vkGetPhysicalDeviceExternalImageFormatPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalImageFormatPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn get_physical_device_external_image_format_properties_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
tiling: vk::ImageTiling,
usage: vk::ImageUsageFlags,
flags: vk::ImageCreateFlags,
external_handle_type: vk::ExternalMemoryHandleTypeFlagsNV,
p_external_image_format_properties: *mut vk::ExternalImageFormatPropertiesNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_image_format_properties_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalImageFormatPropertiesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
format,
r#type,
tiling,
usage,
flags,
external_handle_type,
p_external_image_format_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalImageFormatPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalImageFormatPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn get_physical_device_external_image_format_properties_nv(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
r#type: vk::ImageType,
tiling: vk::ImageTiling,
usage: vk::ImageUsageFlags,
flags: vk::ImageCreateFlags,
external_handle_type: vk::ExternalMemoryHandleTypeFlagsNV,
p_external_image_format_properties: *mut vk::ExternalImageFormatPropertiesNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_image_format_properties_nv(
self,
physical_device,
format,
r#type,
tiling,
usage,
flags,
external_handle_type,
p_external_image_format_properties,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetMemoryWin32HandleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_win32_handle_nv(
device: &Device,
memory: vk::DeviceMemory,
handle_type: vk::ExternalMemoryHandleTypeFlagsNV,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_win32_handle_nv
.ok_or(CallError::MissingCommand("vkGetMemoryWin32HandleNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), memory, handle_type, p_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetMemoryWin32HandleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_win32_handle_nv(
&self,
memory: vk::DeviceMemory,
handle_type: vk::ExternalMemoryHandleTypeFlagsNV,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_win32_handle_nv(self, memory, handle_type, p_handle) }
}
}
/// Call `vkCmdExecuteGeneratedCommandsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteGeneratedCommandsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_execute_generated_commands_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
is_preprocessed: vk::Bool32,
p_generated_commands_info: *const vk::GeneratedCommandsInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_execute_generated_commands_nv
.ok_or(CallError::MissingCommand("vkCmdExecuteGeneratedCommandsNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, is_preprocessed, p_generated_commands_info) };
Ok(())
}
impl Device {
/// Call `vkCmdExecuteGeneratedCommandsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteGeneratedCommandsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_execute_generated_commands_nv(
&self,
command_buffer: vk::CommandBuffer,
is_preprocessed: vk::Bool32,
p_generated_commands_info: *const vk::GeneratedCommandsInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_execute_generated_commands_nv(
self,
command_buffer,
is_preprocessed,
p_generated_commands_info,
)
}
}
}
/// Call `vkCmdPreprocessGeneratedCommandsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPreprocessGeneratedCommandsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_preprocess_generated_commands_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_generated_commands_info: *const vk::GeneratedCommandsInfoNV,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_preprocess_generated_commands_nv
.ok_or(CallError::MissingCommand(
"vkCmdPreprocessGeneratedCommandsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_generated_commands_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPreprocessGeneratedCommandsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPreprocessGeneratedCommandsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_preprocess_generated_commands_nv(
&self,
command_buffer: vk::CommandBuffer,
p_generated_commands_info: *const vk::GeneratedCommandsInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_preprocess_generated_commands_nv(self, command_buffer, p_generated_commands_info) }
}
}
/// Call `vkCmdBindPipelineShaderGroupNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindPipelineShaderGroupNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_pipeline_shader_group_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
group_index: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_pipeline_shader_group_nv
.ok_or(CallError::MissingCommand("vkCmdBindPipelineShaderGroupNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_bind_point, pipeline, group_index) };
Ok(())
}
impl Device {
/// Call `vkCmdBindPipelineShaderGroupNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindPipelineShaderGroupNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_pipeline_shader_group_nv(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
pipeline: vk::Pipeline,
group_index: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_pipeline_shader_group_nv(
self,
command_buffer,
pipeline_bind_point,
pipeline,
group_index,
)
}
}
}
/// Call `vkGetGeneratedCommandsMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGeneratedCommandsMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_generated_commands_memory_requirements_nv(
device: &Device,
p_info: *const vk::GeneratedCommandsMemoryRequirementsInfoNV,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_generated_commands_memory_requirements_nv
.ok_or(CallError::MissingCommand(
"vkGetGeneratedCommandsMemoryRequirementsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetGeneratedCommandsMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGeneratedCommandsMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_generated_commands_memory_requirements_nv(
&self,
p_info: *const vk::GeneratedCommandsMemoryRequirementsInfoNV,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_generated_commands_memory_requirements_nv(self, p_info, p_memory_requirements) }
}
}
/// Call `vkCreateIndirectCommandsLayoutNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectCommandsLayoutNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_indirect_commands_layout_nv(
device: &Device,
p_create_info: *const vk::IndirectCommandsLayoutCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_commands_layout: *mut vk::IndirectCommandsLayoutNV,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_indirect_commands_layout_nv
.ok_or(CallError::MissingCommand(
"vkCreateIndirectCommandsLayoutNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_indirect_commands_layout,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateIndirectCommandsLayoutNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectCommandsLayoutNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_indirect_commands_layout_nv(
&self,
p_create_info: *const vk::IndirectCommandsLayoutCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_commands_layout: *mut vk::IndirectCommandsLayoutNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_indirect_commands_layout_nv(
self,
p_create_info,
p_allocator,
p_indirect_commands_layout,
)
}
}
}
/// Call `vkDestroyIndirectCommandsLayoutNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectCommandsLayoutNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_indirect_commands_layout_nv(
device: &Device,
indirect_commands_layout: vk::IndirectCommandsLayoutNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_indirect_commands_layout_nv
.ok_or(CallError::MissingCommand(
"vkDestroyIndirectCommandsLayoutNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), indirect_commands_layout, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyIndirectCommandsLayoutNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectCommandsLayoutNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_indirect_commands_layout_nv(
&self,
indirect_commands_layout: vk::IndirectCommandsLayoutNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_indirect_commands_layout_nv(self, indirect_commands_layout, p_allocator) }
}
}
/// Call `vkCmdExecuteGeneratedCommandsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteGeneratedCommandsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_execute_generated_commands_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
is_preprocessed: vk::Bool32,
p_generated_commands_info: *const vk::GeneratedCommandsInfoEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_execute_generated_commands_ext
.ok_or(CallError::MissingCommand(
"vkCmdExecuteGeneratedCommandsEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, is_preprocessed, p_generated_commands_info) };
Ok(())
}
impl Device {
/// Call `vkCmdExecuteGeneratedCommandsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdExecuteGeneratedCommandsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_execute_generated_commands_ext(
&self,
command_buffer: vk::CommandBuffer,
is_preprocessed: vk::Bool32,
p_generated_commands_info: *const vk::GeneratedCommandsInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_execute_generated_commands_ext(
self,
command_buffer,
is_preprocessed,
p_generated_commands_info,
)
}
}
}
/// Call `vkCmdPreprocessGeneratedCommandsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPreprocessGeneratedCommandsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_preprocess_generated_commands_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_generated_commands_info: *const vk::GeneratedCommandsInfoEXT,
state_command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_preprocess_generated_commands_ext
.ok_or(CallError::MissingCommand(
"vkCmdPreprocessGeneratedCommandsEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
p_generated_commands_info,
state_command_buffer,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPreprocessGeneratedCommandsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPreprocessGeneratedCommandsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_preprocess_generated_commands_ext(
&self,
command_buffer: vk::CommandBuffer,
p_generated_commands_info: *const vk::GeneratedCommandsInfoEXT,
state_command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_preprocess_generated_commands_ext(
self,
command_buffer,
p_generated_commands_info,
state_command_buffer,
)
}
}
}
/// Call `vkGetGeneratedCommandsMemoryRequirementsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGeneratedCommandsMemoryRequirementsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_generated_commands_memory_requirements_ext(
device: &Device,
p_info: *const vk::GeneratedCommandsMemoryRequirementsInfoEXT,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_generated_commands_memory_requirements_ext
.ok_or(CallError::MissingCommand(
"vkGetGeneratedCommandsMemoryRequirementsEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetGeneratedCommandsMemoryRequirementsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGeneratedCommandsMemoryRequirementsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_generated_commands_memory_requirements_ext(
&self,
p_info: *const vk::GeneratedCommandsMemoryRequirementsInfoEXT,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_generated_commands_memory_requirements_ext(self, p_info, p_memory_requirements) }
}
}
/// Call `vkCreateIndirectCommandsLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectCommandsLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_indirect_commands_layout_ext(
device: &Device,
p_create_info: *const vk::IndirectCommandsLayoutCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_commands_layout: *mut vk::IndirectCommandsLayoutEXT,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_indirect_commands_layout_ext
.ok_or(CallError::MissingCommand(
"vkCreateIndirectCommandsLayoutEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_indirect_commands_layout,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateIndirectCommandsLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectCommandsLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_indirect_commands_layout_ext(
&self,
p_create_info: *const vk::IndirectCommandsLayoutCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_commands_layout: *mut vk::IndirectCommandsLayoutEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_indirect_commands_layout_ext(
self,
p_create_info,
p_allocator,
p_indirect_commands_layout,
)
}
}
}
/// Call `vkDestroyIndirectCommandsLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectCommandsLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_indirect_commands_layout_ext(
device: &Device,
indirect_commands_layout: vk::IndirectCommandsLayoutEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_indirect_commands_layout_ext
.ok_or(CallError::MissingCommand(
"vkDestroyIndirectCommandsLayoutEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), indirect_commands_layout, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyIndirectCommandsLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectCommandsLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_indirect_commands_layout_ext(
&self,
indirect_commands_layout: vk::IndirectCommandsLayoutEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_indirect_commands_layout_ext(self, indirect_commands_layout, p_allocator) }
}
}
/// Call `vkCreateIndirectExecutionSetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectExecutionSetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_indirect_execution_set_ext(
device: &Device,
p_create_info: *const vk::IndirectExecutionSetCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_execution_set: *mut vk::IndirectExecutionSetEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_indirect_execution_set_ext
.ok_or(CallError::MissingCommand("vkCreateIndirectExecutionSetEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_indirect_execution_set,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateIndirectExecutionSetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIndirectExecutionSetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_indirect_execution_set_ext(
&self,
p_create_info: *const vk::IndirectExecutionSetCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_indirect_execution_set: *mut vk::IndirectExecutionSetEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_indirect_execution_set_ext(self, p_create_info, p_allocator, p_indirect_execution_set)
}
}
}
/// Call `vkDestroyIndirectExecutionSetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectExecutionSetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_indirect_execution_set_ext(
device: &Device,
indirect_execution_set: vk::IndirectExecutionSetEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_indirect_execution_set_ext
.ok_or(CallError::MissingCommand(
"vkDestroyIndirectExecutionSetEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), indirect_execution_set, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyIndirectExecutionSetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyIndirectExecutionSetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_indirect_execution_set_ext(
&self,
indirect_execution_set: vk::IndirectExecutionSetEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_indirect_execution_set_ext(self, indirect_execution_set, p_allocator) }
}
}
/// Call `vkUpdateIndirectExecutionSetPipelineEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateIndirectExecutionSetPipelineEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn update_indirect_execution_set_pipeline_ext(
device: &Device,
indirect_execution_set: vk::IndirectExecutionSetEXT,
execution_set_write_count: u32,
p_execution_set_writes: *const vk::WriteIndirectExecutionSetPipelineEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.update_indirect_execution_set_pipeline_ext
.ok_or(CallError::MissingCommand(
"vkUpdateIndirectExecutionSetPipelineEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
indirect_execution_set,
execution_set_write_count,
p_execution_set_writes,
)
};
Ok(())
}
impl Device {
/// Call `vkUpdateIndirectExecutionSetPipelineEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateIndirectExecutionSetPipelineEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn update_indirect_execution_set_pipeline_ext(
&self,
indirect_execution_set: vk::IndirectExecutionSetEXT,
execution_set_write_count: u32,
p_execution_set_writes: *const vk::WriteIndirectExecutionSetPipelineEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
update_indirect_execution_set_pipeline_ext(
self,
indirect_execution_set,
execution_set_write_count,
p_execution_set_writes,
)
}
}
}
/// Call `vkUpdateIndirectExecutionSetShaderEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateIndirectExecutionSetShaderEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn update_indirect_execution_set_shader_ext(
device: &Device,
indirect_execution_set: vk::IndirectExecutionSetEXT,
execution_set_write_count: u32,
p_execution_set_writes: *const vk::WriteIndirectExecutionSetShaderEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.update_indirect_execution_set_shader_ext
.ok_or(CallError::MissingCommand(
"vkUpdateIndirectExecutionSetShaderEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
indirect_execution_set,
execution_set_write_count,
p_execution_set_writes,
)
};
Ok(())
}
impl Device {
/// Call `vkUpdateIndirectExecutionSetShaderEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateIndirectExecutionSetShaderEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn update_indirect_execution_set_shader_ext(
&self,
indirect_execution_set: vk::IndirectExecutionSetEXT,
execution_set_write_count: u32,
p_execution_set_writes: *const vk::WriteIndirectExecutionSetShaderEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
update_indirect_execution_set_shader_ext(
self,
indirect_execution_set,
execution_set_write_count,
p_execution_set_writes,
)
}
}
}
/// Call `vkGetPhysicalDeviceFeatures2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFeatures2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_features2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
features: &mut vk::PhysicalDeviceFeatures2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_features2
.ok_or(CallError::MissingCommand("vkGetPhysicalDeviceFeatures2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, features) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceFeatures2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFeatures2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_features2(
&self,
physical_device: vk::PhysicalDevice,
features: &mut vk::PhysicalDeviceFeatures2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_features2(self, physical_device, features) }
}
}
/// Call `vkGetPhysicalDeviceFeatures2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFeatures2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_features2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
features: &mut vk::PhysicalDeviceFeatures2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_features2_khr
.ok_or(CallError::MissingCommand("vkGetPhysicalDeviceFeatures2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, features) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceFeatures2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFeatures2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_features2_khr(
&self,
physical_device: vk::PhysicalDevice,
features: &mut vk::PhysicalDeviceFeatures2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_features2_khr(self, physical_device, features) }
}
}
/// Call `vkGetPhysicalDeviceProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
properties: &mut vk::PhysicalDeviceProperties2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_properties2
.ok_or(CallError::MissingCommand("vkGetPhysicalDeviceProperties2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_properties2(
&self,
physical_device: vk::PhysicalDevice,
properties: &mut vk::PhysicalDeviceProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_properties2(self, physical_device, properties) }
}
}
/// Call `vkGetPhysicalDeviceProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
properties: &mut vk::PhysicalDeviceProperties2,
) -> Result<(), CallError> {
let __vk_function =
instance
.fp()
.get_physical_device_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
properties: &mut vk::PhysicalDeviceProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_properties2_khr(self, physical_device, properties) }
}
}
/// Call `vkGetPhysicalDeviceFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_format_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties2,
) -> Result<(), CallError> {
let __vk_function =
instance
.fp()
.get_physical_device_format_properties2
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceFormatProperties2",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, format, format_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_format_properties2(self, physical_device, format, format_properties)
}
}
}
/// Call `vkGetPhysicalDeviceFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_format_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_format_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceFormatProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, format, format_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_format_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
format: vk::Format,
format_properties: &mut vk::FormatProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_format_properties2_khr(self, physical_device, format, format_properties)
}
}
}
/// Call `vkGetPhysicalDeviceImageFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_image_format_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
image_format_info: &vk::PhysicalDeviceImageFormatInfo2,
image_format_properties: &mut vk::ImageFormatProperties2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_image_format_properties2
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceImageFormatProperties2",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(physical_device, image_format_info, image_format_properties) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceImageFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_image_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
image_format_info: &vk::PhysicalDeviceImageFormatInfo2,
image_format_properties: &mut vk::ImageFormatProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_image_format_properties2(
self,
physical_device,
image_format_info,
image_format_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceImageFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_image_format_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
image_format_info: &vk::PhysicalDeviceImageFormatInfo2,
image_format_properties: &mut vk::ImageFormatProperties2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_image_format_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceImageFormatProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(physical_device, image_format_info, image_format_properties) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceImageFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceImageFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_image_format_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
image_format_info: &vk::PhysicalDeviceImageFormatInfo2,
image_format_properties: &mut vk::ImageFormatProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_image_format_properties2_khr(
self,
physical_device,
image_format_info,
image_format_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_physical_device_queue_family_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_property_count: &mut u32,
queue_family_properties: Option<&mut [vk::QueueFamilyProperties2]>,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_properties2
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyProperties2",
))?;
let capacity = queue_family_properties.as_ref().map(|values| values.len());
if let Some(capacity) = capacity {
*queue_family_property_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values = queue_family_properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, queue_family_property_count, values) };
if capacity.is_some_and(|capacity| u64::from(*queue_family_property_count) > capacity as u64) {
return Err(CallError::InvalidOutput(
"vkGetPhysicalDeviceQueueFamilyProperties2",
));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_properties2(
&self,
physical_device: vk::PhysicalDevice,
queue_family_property_count: &mut u32,
queue_family_properties: Option<&mut [vk::QueueFamilyProperties2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_properties2(
self,
physical_device,
queue_family_property_count,
queue_family_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_physical_device_queue_family_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_property_count: &mut u32,
queue_family_properties: Option<&mut [vk::QueueFamilyProperties2]>,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyProperties2KHR",
))?;
let capacity = queue_family_properties.as_ref().map(|values| values.len());
if let Some(capacity) = capacity {
*queue_family_property_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values = queue_family_properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, queue_family_property_count, values) };
if capacity.is_some_and(|capacity| u64::from(*queue_family_property_count) > capacity as u64) {
return Err(CallError::InvalidOutput(
"vkGetPhysicalDeviceQueueFamilyProperties2KHR",
));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_property_count: &mut u32,
queue_family_properties: Option<&mut [vk::QueueFamilyProperties2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_properties2_khr(
self,
physical_device,
queue_family_property_count,
queue_family_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceMemoryProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMemoryProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_memory_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
memory_properties: &mut vk::PhysicalDeviceMemoryProperties2,
) -> Result<(), CallError> {
let __vk_function =
instance
.fp()
.get_physical_device_memory_properties2
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceMemoryProperties2",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, memory_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceMemoryProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMemoryProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_memory_properties2(
&self,
physical_device: vk::PhysicalDevice,
memory_properties: &mut vk::PhysicalDeviceMemoryProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_memory_properties2(self, physical_device, memory_properties) }
}
}
/// Call `vkGetPhysicalDeviceMemoryProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMemoryProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_memory_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
memory_properties: &mut vk::PhysicalDeviceMemoryProperties2,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_memory_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceMemoryProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, memory_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceMemoryProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMemoryProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_memory_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
memory_properties: &mut vk::PhysicalDeviceMemoryProperties2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_memory_properties2_khr(self, physical_device, memory_properties) }
}
}
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_physical_device_sparse_image_format_properties2(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
property_count: &mut u32,
properties: Option<&mut [vk::SparseImageFormatProperties2]>,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_sparse_image_format_properties2
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSparseImageFormatProperties2",
))?;
let capacity = properties.as_ref().map(|values| values.len());
if let Some(capacity) = capacity {
*property_count = u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values = properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, format_info, property_count, values) };
if capacity.is_some_and(|capacity| u64::from(*property_count) > capacity as u64) {
return Err(CallError::InvalidOutput(
"vkGetPhysicalDeviceSparseImageFormatProperties2",
));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_physical_device_sparse_image_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
property_count: &mut u32,
properties: Option<&mut [vk::SparseImageFormatProperties2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_sparse_image_format_properties2(
self,
physical_device,
format_info,
property_count,
properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_physical_device_sparse_image_format_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
property_count: &mut u32,
properties: Option<&mut [vk::SparseImageFormatProperties2]>,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_sparse_image_format_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSparseImageFormatProperties2KHR",
))?;
let capacity = properties.as_ref().map(|values| values.len());
if let Some(capacity) = capacity {
*property_count = u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values = properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, format_info, property_count, values) };
if capacity.is_some_and(|capacity| u64::from(*property_count) > capacity as u64) {
return Err(CallError::InvalidOutput(
"vkGetPhysicalDeviceSparseImageFormatProperties2KHR",
));
}
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceSparseImageFormatProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSparseImageFormatProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_physical_device_sparse_image_format_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
property_count: &mut u32,
properties: Option<&mut [vk::SparseImageFormatProperties2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_sparse_image_format_properties2_khr(
self,
physical_device,
format_info,
property_count,
properties,
)
}
}
}
/// Call `vkCmdPushDescriptorSet` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
descriptor_write_count: u32,
p_descriptor_writes: *const vk::WriteDescriptorSet,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set
.ok_or(CallError::MissingCommand("vkCmdPushDescriptorSet"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
pipeline_bind_point,
layout,
set,
descriptor_write_count,
p_descriptor_writes,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSet` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
descriptor_write_count: u32,
p_descriptor_writes: *const vk::WriteDescriptorSet,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set(
self,
command_buffer,
pipeline_bind_point,
layout,
set,
descriptor_write_count,
p_descriptor_writes,
)
}
}
}
/// Call `vkCmdPushDescriptorSetKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
descriptor_write_count: u32,
p_descriptor_writes: *const vk::WriteDescriptorSet,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set_khr
.ok_or(CallError::MissingCommand("vkCmdPushDescriptorSetKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
pipeline_bind_point,
layout,
set,
descriptor_write_count,
p_descriptor_writes,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSetKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set_khr(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
descriptor_write_count: u32,
p_descriptor_writes: *const vk::WriteDescriptorSet,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set_khr(
self,
command_buffer,
pipeline_bind_point,
layout,
set,
descriptor_write_count,
p_descriptor_writes,
)
}
}
}
/// Call `vkTrimCommandPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTrimCommandPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn trim_command_pool(
device: &Device,
command_pool: vk::CommandPool,
flags: vk::CommandPoolTrimFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.trim_command_pool
.ok_or(CallError::MissingCommand("vkTrimCommandPool"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), command_pool, flags) };
Ok(())
}
impl Device {
/// Call `vkTrimCommandPool` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTrimCommandPool` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn trim_command_pool(
&self,
command_pool: vk::CommandPool,
flags: vk::CommandPoolTrimFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { trim_command_pool(self, command_pool, flags) }
}
}
/// Call `vkTrimCommandPoolKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTrimCommandPoolKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn trim_command_pool_khr(
device: &Device,
command_pool: vk::CommandPool,
flags: vk::CommandPoolTrimFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.trim_command_pool_khr
.ok_or(CallError::MissingCommand("vkTrimCommandPoolKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), command_pool, flags) };
Ok(())
}
impl Device {
/// Call `vkTrimCommandPoolKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTrimCommandPoolKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn trim_command_pool_khr(
&self,
command_pool: vk::CommandPool,
flags: vk::CommandPoolTrimFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { trim_command_pool_khr(self, command_pool, flags) }
}
}
/// Call `vkGetPhysicalDeviceExternalBufferProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalBufferProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_buffer_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
external_buffer_properties: &mut vk::ExternalBufferProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_buffer_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalBufferProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_buffer_info,
external_buffer_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalBufferProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalBufferProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_buffer_properties(
&self,
physical_device: vk::PhysicalDevice,
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
external_buffer_properties: &mut vk::ExternalBufferProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_buffer_properties(
self,
physical_device,
external_buffer_info,
external_buffer_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceExternalBufferPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalBufferPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_buffer_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
external_buffer_properties: &mut vk::ExternalBufferProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_buffer_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalBufferPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_buffer_info,
external_buffer_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalBufferPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalBufferPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_buffer_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
external_buffer_properties: &mut vk::ExternalBufferProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_buffer_properties_khr(
self,
physical_device,
external_buffer_info,
external_buffer_properties,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetMemoryWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_win32_handle_khr(
device: &Device,
p_get_win32_handle_info: *const vk::MemoryGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_win32_handle_khr
.ok_or(CallError::MissingCommand("vkGetMemoryWin32HandleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_win32_handle_info, p_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetMemoryWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_win32_handle_khr(
&self,
p_get_win32_handle_info: *const vk::MemoryGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_win32_handle_khr(self, p_get_win32_handle_info, p_handle) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetMemoryWin32HandlePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandlePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_win32_handle_properties_khr(
device: &Device,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
handle: vk::HANDLE,
p_memory_win32_handle_properties: *mut vk::MemoryWin32HandlePropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_memory_win32_handle_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetMemoryWin32HandlePropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
handle_type,
handle,
p_memory_win32_handle_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetMemoryWin32HandlePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryWin32HandlePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_win32_handle_properties_khr(
&self,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
handle: vk::HANDLE,
p_memory_win32_handle_properties: *mut vk::MemoryWin32HandlePropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_memory_win32_handle_properties_khr(
self,
handle_type,
handle,
p_memory_win32_handle_properties,
)
}
}
}
/// Call `vkGetMemoryFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_fd_khr(
device: &Device,
p_get_fd_info: *const vk::MemoryGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_fd_khr
.ok_or(CallError::MissingCommand("vkGetMemoryFdKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_fd_info, p_fd) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetMemoryFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_fd_khr(
&self,
p_get_fd_info: *const vk::MemoryGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_fd_khr(self, p_get_fd_info, p_fd) }
}
}
/// Call `vkGetMemoryFdPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryFdPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_fd_properties_khr(
device: &Device,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
fd: i32,
p_memory_fd_properties: *mut vk::MemoryFdPropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_fd_properties_khr
.ok_or(CallError::MissingCommand("vkGetMemoryFdPropertiesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), handle_type, fd, p_memory_fd_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetMemoryFdPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryFdPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_fd_properties_khr(
&self,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
fd: i32,
p_memory_fd_properties: *mut vk::MemoryFdPropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_fd_properties_khr(self, handle_type, fd, p_memory_fd_properties) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkGetMemoryZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_zircon_handle_fuchsia(
device: &Device,
p_get_zircon_handle_info: *const vk::MemoryGetZirconHandleInfoFUCHSIA,
p_zircon_handle: *mut vk::zx_handle_t,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_zircon_handle_fuchsia
.ok_or(CallError::MissingCommand("vkGetMemoryZirconHandleFUCHSIA"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_zircon_handle_info, p_zircon_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkGetMemoryZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_zircon_handle_fuchsia(
&self,
p_get_zircon_handle_info: *const vk::MemoryGetZirconHandleInfoFUCHSIA,
p_zircon_handle: *mut vk::zx_handle_t,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_zircon_handle_fuchsia(self, p_get_zircon_handle_info, p_zircon_handle) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkGetMemoryZirconHandlePropertiesFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryZirconHandlePropertiesFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_zircon_handle_properties_fuchsia(
device: &Device,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
zircon_handle: vk::zx_handle_t,
p_memory_zircon_handle_properties: *mut vk::MemoryZirconHandlePropertiesFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_zircon_handle_properties_fuchsia
.ok_or(CallError::MissingCommand(
"vkGetMemoryZirconHandlePropertiesFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
handle_type,
zircon_handle,
p_memory_zircon_handle_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkGetMemoryZirconHandlePropertiesFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryZirconHandlePropertiesFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_zircon_handle_properties_fuchsia(
&self,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
zircon_handle: vk::zx_handle_t,
p_memory_zircon_handle_properties: *mut vk::MemoryZirconHandlePropertiesFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_memory_zircon_handle_properties_fuchsia(
self,
handle_type,
zircon_handle,
p_memory_zircon_handle_properties,
)
}
}
}
/// Call `vkGetMemoryRemoteAddressNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryRemoteAddressNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_remote_address_nv(
device: &Device,
p_memory_get_remote_address_info: *const vk::MemoryGetRemoteAddressInfoNV,
p_address: *mut vk::RemoteAddressNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_remote_address_nv
.ok_or(CallError::MissingCommand("vkGetMemoryRemoteAddressNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(device.handle(), p_memory_get_remote_address_info, p_address) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetMemoryRemoteAddressNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryRemoteAddressNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_remote_address_nv(
&self,
p_memory_get_remote_address_info: *const vk::MemoryGetRemoteAddressInfoNV,
p_address: *mut vk::RemoteAddressNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_remote_address_nv(self, p_memory_get_remote_address_info, p_address) }
}
}
/// Call `vkGetPhysicalDeviceExternalSemaphoreProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalSemaphoreProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_semaphore_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
external_semaphore_properties: &mut vk::ExternalSemaphoreProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_semaphore_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalSemaphoreProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_semaphore_info,
external_semaphore_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalSemaphoreProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalSemaphoreProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_semaphore_properties(
&self,
physical_device: vk::PhysicalDevice,
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
external_semaphore_properties: &mut vk::ExternalSemaphoreProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_semaphore_properties(
self,
physical_device,
external_semaphore_info,
external_semaphore_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceExternalSemaphorePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalSemaphorePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_semaphore_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
external_semaphore_properties: &mut vk::ExternalSemaphoreProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_semaphore_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalSemaphorePropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_semaphore_info,
external_semaphore_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalSemaphorePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalSemaphorePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_semaphore_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
external_semaphore_properties: &mut vk::ExternalSemaphoreProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_semaphore_properties_khr(
self,
physical_device,
external_semaphore_info,
external_semaphore_properties,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetSemaphoreWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_semaphore_win32_handle_khr(
device: &Device,
p_get_win32_handle_info: *const vk::SemaphoreGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_semaphore_win32_handle_khr
.ok_or(CallError::MissingCommand("vkGetSemaphoreWin32HandleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_win32_handle_info, p_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetSemaphoreWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_semaphore_win32_handle_khr(
&self,
p_get_win32_handle_info: *const vk::SemaphoreGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_semaphore_win32_handle_khr(self, p_get_win32_handle_info, p_handle) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkImportSemaphoreWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn import_semaphore_win32_handle_khr(
device: &Device,
p_import_semaphore_win32_handle_info: *const vk::ImportSemaphoreWin32HandleInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.import_semaphore_win32_handle_khr
.ok_or(CallError::MissingCommand("vkImportSemaphoreWin32HandleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_import_semaphore_win32_handle_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkImportSemaphoreWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn import_semaphore_win32_handle_khr(
&self,
p_import_semaphore_win32_handle_info: *const vk::ImportSemaphoreWin32HandleInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { import_semaphore_win32_handle_khr(self, p_import_semaphore_win32_handle_info) }
}
}
/// Call `vkGetSemaphoreFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_semaphore_fd_khr(
device: &Device,
p_get_fd_info: *const vk::SemaphoreGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_semaphore_fd_khr
.ok_or(CallError::MissingCommand("vkGetSemaphoreFdKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_fd_info, p_fd) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSemaphoreFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_semaphore_fd_khr(
&self,
p_get_fd_info: *const vk::SemaphoreGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_semaphore_fd_khr(self, p_get_fd_info, p_fd) }
}
}
/// Call `vkImportSemaphoreFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn import_semaphore_fd_khr(
device: &Device,
p_import_semaphore_fd_info: *const vk::ImportSemaphoreFdInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.import_semaphore_fd_khr
.ok_or(CallError::MissingCommand("vkImportSemaphoreFdKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_import_semaphore_fd_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkImportSemaphoreFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn import_semaphore_fd_khr(
&self,
p_import_semaphore_fd_info: *const vk::ImportSemaphoreFdInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { import_semaphore_fd_khr(self, p_import_semaphore_fd_info) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkGetSemaphoreZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_semaphore_zircon_handle_fuchsia(
device: &Device,
p_get_zircon_handle_info: *const vk::SemaphoreGetZirconHandleInfoFUCHSIA,
p_zircon_handle: *mut vk::zx_handle_t,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_semaphore_zircon_handle_fuchsia
.ok_or(CallError::MissingCommand(
"vkGetSemaphoreZirconHandleFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_zircon_handle_info, p_zircon_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkGetSemaphoreZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_semaphore_zircon_handle_fuchsia(
&self,
p_get_zircon_handle_info: *const vk::SemaphoreGetZirconHandleInfoFUCHSIA,
p_zircon_handle: *mut vk::zx_handle_t,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_semaphore_zircon_handle_fuchsia(self, p_get_zircon_handle_info, p_zircon_handle) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkImportSemaphoreZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn import_semaphore_zircon_handle_fuchsia(
device: &Device,
p_import_semaphore_zircon_handle_info: *const vk::ImportSemaphoreZirconHandleInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.import_semaphore_zircon_handle_fuchsia
.ok_or(CallError::MissingCommand(
"vkImportSemaphoreZirconHandleFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_import_semaphore_zircon_handle_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkImportSemaphoreZirconHandleFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportSemaphoreZirconHandleFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn import_semaphore_zircon_handle_fuchsia(
&self,
p_import_semaphore_zircon_handle_info: *const vk::ImportSemaphoreZirconHandleInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { import_semaphore_zircon_handle_fuchsia(self, p_import_semaphore_zircon_handle_info) }
}
}
/// Call `vkGetPhysicalDeviceExternalFenceProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalFenceProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_fence_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
external_fence_properties: &mut vk::ExternalFenceProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_fence_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalFenceProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_fence_info,
external_fence_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalFenceProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalFenceProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_fence_properties(
&self,
physical_device: vk::PhysicalDevice,
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
external_fence_properties: &mut vk::ExternalFenceProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_fence_properties(
self,
physical_device,
external_fence_info,
external_fence_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceExternalFencePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalFencePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_physical_device_external_fence_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
external_fence_properties: &mut vk::ExternalFenceProperties,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_fence_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalFencePropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
external_fence_info,
external_fence_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalFencePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalFencePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_physical_device_external_fence_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
external_fence_properties: &mut vk::ExternalFenceProperties,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_fence_properties_khr(
self,
physical_device,
external_fence_info,
external_fence_properties,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetFenceWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_fence_win32_handle_khr(
device: &Device,
p_get_win32_handle_info: *const vk::FenceGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_fence_win32_handle_khr
.ok_or(CallError::MissingCommand("vkGetFenceWin32HandleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_win32_handle_info, p_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetFenceWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_fence_win32_handle_khr(
&self,
p_get_win32_handle_info: *const vk::FenceGetWin32HandleInfoKHR,
p_handle: *mut vk::HANDLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_fence_win32_handle_khr(self, p_get_win32_handle_info, p_handle) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkImportFenceWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportFenceWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn import_fence_win32_handle_khr(
device: &Device,
p_import_fence_win32_handle_info: *const vk::ImportFenceWin32HandleInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.import_fence_win32_handle_khr
.ok_or(CallError::MissingCommand("vkImportFenceWin32HandleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_import_fence_win32_handle_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkImportFenceWin32HandleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportFenceWin32HandleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn import_fence_win32_handle_khr(
&self,
p_import_fence_win32_handle_info: *const vk::ImportFenceWin32HandleInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { import_fence_win32_handle_khr(self, p_import_fence_win32_handle_info) }
}
}
/// Call `vkGetFenceFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_fence_fd_khr(
device: &Device,
p_get_fd_info: *const vk::FenceGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_fence_fd_khr
.ok_or(CallError::MissingCommand("vkGetFenceFdKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_fd_info, p_fd) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetFenceFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFenceFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_fence_fd_khr(
&self,
p_get_fd_info: *const vk::FenceGetFdInfoKHR,
p_fd: *mut i32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_fence_fd_khr(self, p_get_fd_info, p_fd) }
}
}
/// Call `vkImportFenceFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportFenceFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn import_fence_fd_khr(
device: &Device,
p_import_fence_fd_info: *const vk::ImportFenceFdInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.import_fence_fd_khr
.ok_or(CallError::MissingCommand("vkImportFenceFdKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_import_fence_fd_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkImportFenceFdKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkImportFenceFdKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn import_fence_fd_khr(
&self,
p_import_fence_fd_info: *const vk::ImportFenceFdInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { import_fence_fd_khr(self, p_import_fence_fd_info) }
}
}
/// Call `vkReleaseDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_display_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.release_display_ext
.ok_or(CallError::MissingCommand("vkReleaseDisplayEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkReleaseDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_display_ext(
&self,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_display_ext(self, physical_device, display) }
}
}
#[cfg(feature = "platform-xlib-xrandr")]
/// Call `vkAcquireXlibDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireXlibDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_xlib_display_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
dpy: *mut vk::Display,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.acquire_xlib_display_ext
.ok_or(CallError::MissingCommand("vkAcquireXlibDisplayEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, dpy, display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-xlib-xrandr")]
impl Instance {
/// Call `vkAcquireXlibDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireXlibDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_xlib_display_ext(
&self,
physical_device: vk::PhysicalDevice,
dpy: *mut vk::Display,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_xlib_display_ext(self, physical_device, dpy, display) }
}
}
#[cfg(feature = "platform-xlib-xrandr")]
/// Call `vkGetRandROutputDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRandROutputDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_rand_r_output_display_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
dpy: *mut vk::Display,
rr_output: vk::RROutput,
p_display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_rand_r_output_display_ext
.ok_or(CallError::MissingCommand("vkGetRandROutputDisplayEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, dpy, rr_output, p_display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-xlib-xrandr")]
impl Instance {
/// Call `vkGetRandROutputDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRandROutputDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_rand_r_output_display_ext(
&self,
physical_device: vk::PhysicalDevice,
dpy: *mut vk::Display,
rr_output: vk::RROutput,
p_display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_rand_r_output_display_ext(self, physical_device, dpy, rr_output, p_display) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkAcquireWinrtDisplayNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireWinrtDisplayNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_winrt_display_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.acquire_winrt_display_nv
.ok_or(CallError::MissingCommand("vkAcquireWinrtDisplayNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Instance {
/// Call `vkAcquireWinrtDisplayNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireWinrtDisplayNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_winrt_display_nv(
&self,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_winrt_display_nv(self, physical_device, display) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetWinrtDisplayNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetWinrtDisplayNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_winrt_display_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
device_relative_id: u32,
p_display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_winrt_display_nv
.ok_or(CallError::MissingCommand("vkGetWinrtDisplayNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, device_relative_id, p_display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Instance {
/// Call `vkGetWinrtDisplayNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetWinrtDisplayNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_winrt_display_nv(
&self,
physical_device: vk::PhysicalDevice,
device_relative_id: u32,
p_display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_winrt_display_nv(self, physical_device, device_relative_id, p_display) }
}
}
/// Call `vkDisplayPowerControlEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDisplayPowerControlEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn display_power_control_ext(
device: &Device,
display: vk::DisplayKHR,
p_display_power_info: *const vk::DisplayPowerInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.display_power_control_ext
.ok_or(CallError::MissingCommand("vkDisplayPowerControlEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), display, p_display_power_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkDisplayPowerControlEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDisplayPowerControlEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn display_power_control_ext(
&self,
display: vk::DisplayKHR,
p_display_power_info: *const vk::DisplayPowerInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { display_power_control_ext(self, display, p_display_power_info) }
}
}
/// Call `vkRegisterDeviceEventEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterDeviceEventEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn register_device_event_ext(
device: &Device,
p_device_event_info: *const vk::DeviceEventInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_fence: *mut vk::Fence,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.register_device_event_ext
.ok_or(CallError::MissingCommand("vkRegisterDeviceEventEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_device_event_info, p_allocator, p_fence) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkRegisterDeviceEventEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterDeviceEventEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn register_device_event_ext(
&self,
p_device_event_info: *const vk::DeviceEventInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_fence: *mut vk::Fence,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { register_device_event_ext(self, p_device_event_info, p_allocator, p_fence) }
}
}
/// Call `vkRegisterDisplayEventEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterDisplayEventEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn register_display_event_ext(
device: &Device,
display: vk::DisplayKHR,
p_display_event_info: *const vk::DisplayEventInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_fence: *mut vk::Fence,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.register_display_event_ext
.ok_or(CallError::MissingCommand("vkRegisterDisplayEventEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
display,
p_display_event_info,
p_allocator,
p_fence,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkRegisterDisplayEventEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterDisplayEventEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn register_display_event_ext(
&self,
display: vk::DisplayKHR,
p_display_event_info: *const vk::DisplayEventInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_fence: *mut vk::Fence,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { register_display_event_ext(self, display, p_display_event_info, p_allocator, p_fence) }
}
}
/// Call `vkGetSwapchainCounterEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainCounterEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_swapchain_counter_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
counter: vk::SurfaceCounterFlagBitsEXT,
p_counter_value: *mut u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_swapchain_counter_ext
.ok_or(CallError::MissingCommand("vkGetSwapchainCounterEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, counter, p_counter_value) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSwapchainCounterEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainCounterEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_swapchain_counter_ext(
&self,
swapchain: vk::SwapchainKHR,
counter: vk::SurfaceCounterFlagBitsEXT,
p_counter_value: *mut u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_swapchain_counter_ext(self, swapchain, counter, p_counter_value) }
}
}
/// Call `vkGetPhysicalDeviceSurfaceCapabilities2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilities2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_capabilities2_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_capabilities: *mut vk::SurfaceCapabilities2EXT,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_capabilities2_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceCapabilities2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, surface, p_surface_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceCapabilities2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilities2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_capabilities2_ext(
&self,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_surface_capabilities: *mut vk::SurfaceCapabilities2EXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_capabilities2_ext(
self,
physical_device,
surface,
p_surface_capabilities,
)
}
}
}
/// Call `vkEnumeratePhysicalDeviceGroups` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceGroups` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn enumerate_physical_device_groups(
instance: &Instance,
physical_device_group_count: &mut u32,
physical_device_group_properties: Option<&mut [vk::PhysicalDeviceGroupProperties]>,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.enumerate_physical_device_groups
.ok_or(CallError::MissingCommand("vkEnumeratePhysicalDeviceGroups"))?;
let capacity = physical_device_group_properties
.as_ref()
.map(|values| values.len());
if let Some(capacity) = capacity {
*physical_device_group_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values =
physical_device_group_properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), physical_device_group_count, values) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
if capacity.is_some_and(|capacity| u64::from(*physical_device_group_count) > capacity as u64) {
return Err(CallError::InvalidOutput("vkEnumeratePhysicalDeviceGroups"));
}
Ok(result)
}
impl Instance {
/// Call `vkEnumeratePhysicalDeviceGroups` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceGroups` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn enumerate_physical_device_groups(
&self,
physical_device_group_count: &mut u32,
physical_device_group_properties: Option<&mut [vk::PhysicalDeviceGroupProperties]>,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
enumerate_physical_device_groups(
self,
physical_device_group_count,
physical_device_group_properties,
)
}
}
}
/// Call `vkEnumeratePhysicalDeviceGroupsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceGroupsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn enumerate_physical_device_groups_khr(
instance: &Instance,
physical_device_group_count: &mut u32,
physical_device_group_properties: Option<&mut [vk::PhysicalDeviceGroupProperties]>,
) -> Result<vk::Result, CallError> {
let __vk_function =
instance
.fp()
.enumerate_physical_device_groups_khr
.ok_or(CallError::MissingCommand(
"vkEnumeratePhysicalDeviceGroupsKHR",
))?;
let capacity = physical_device_group_properties
.as_ref()
.map(|values| values.len());
if let Some(capacity) = capacity {
*physical_device_group_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values =
physical_device_group_properties.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), physical_device_group_count, values) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
if capacity.is_some_and(|capacity| u64::from(*physical_device_group_count) > capacity as u64) {
return Err(CallError::InvalidOutput(
"vkEnumeratePhysicalDeviceGroupsKHR",
));
}
Ok(result)
}
impl Instance {
/// Call `vkEnumeratePhysicalDeviceGroupsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceGroupsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn enumerate_physical_device_groups_khr(
&self,
physical_device_group_count: &mut u32,
physical_device_group_properties: Option<&mut [vk::PhysicalDeviceGroupProperties]>,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
enumerate_physical_device_groups_khr(
self,
physical_device_group_count,
physical_device_group_properties,
)
}
}
}
/// Call `vkGetDeviceGroupPeerMemoryFeatures` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPeerMemoryFeatures` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_device_group_peer_memory_features(
device: &Device,
heap_index: u32,
local_device_index: u32,
remote_device_index: u32,
peer_memory_features: &mut vk::PeerMemoryFeatureFlags,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_group_peer_memory_features
.ok_or(CallError::MissingCommand(
"vkGetDeviceGroupPeerMemoryFeatures",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
heap_index,
local_device_index,
remote_device_index,
peer_memory_features,
)
};
Ok(())
}
impl Device {
/// Call `vkGetDeviceGroupPeerMemoryFeatures` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPeerMemoryFeatures` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_device_group_peer_memory_features(
&self,
heap_index: u32,
local_device_index: u32,
remote_device_index: u32,
peer_memory_features: &mut vk::PeerMemoryFeatureFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_group_peer_memory_features(
self,
heap_index,
local_device_index,
remote_device_index,
peer_memory_features,
)
}
}
}
/// Call `vkGetDeviceGroupPeerMemoryFeaturesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPeerMemoryFeaturesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_device_group_peer_memory_features_khr(
device: &Device,
heap_index: u32,
local_device_index: u32,
remote_device_index: u32,
peer_memory_features: &mut vk::PeerMemoryFeatureFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_group_peer_memory_features_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceGroupPeerMemoryFeaturesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
heap_index,
local_device_index,
remote_device_index,
peer_memory_features,
)
};
Ok(())
}
impl Device {
/// Call `vkGetDeviceGroupPeerMemoryFeaturesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPeerMemoryFeaturesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_device_group_peer_memory_features_khr(
&self,
heap_index: u32,
local_device_index: u32,
remote_device_index: u32,
peer_memory_features: &mut vk::PeerMemoryFeatureFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_group_peer_memory_features_khr(
self,
heap_index,
local_device_index,
remote_device_index,
peer_memory_features,
)
}
}
}
/// Call `vkBindBufferMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindBufferMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn bind_buffer_memory2(
device: &Device,
bind_infos: &[vk::BindBufferMemoryInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.bind_buffer_memory2
.ok_or(CallError::MissingCommand("vkBindBufferMemory2"))?;
let bind_info_count =
u32::try_from(bind_infos.len()).map_err(|_| CallError::CountOverflow(bind_infos.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, bind_infos.as_ptr()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkBindBufferMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindBufferMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn bind_buffer_memory2(
&self,
bind_infos: &[vk::BindBufferMemoryInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_buffer_memory2(self, bind_infos) }
}
}
/// Call `vkBindBufferMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindBufferMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn bind_buffer_memory2_khr(
device: &Device,
bind_infos: &[vk::BindBufferMemoryInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.bind_buffer_memory2_khr
.ok_or(CallError::MissingCommand("vkBindBufferMemory2KHR"))?;
let bind_info_count =
u32::try_from(bind_infos.len()).map_err(|_| CallError::CountOverflow(bind_infos.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, bind_infos.as_ptr()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkBindBufferMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindBufferMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn bind_buffer_memory2_khr(
&self,
bind_infos: &[vk::BindBufferMemoryInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_buffer_memory2_khr(self, bind_infos) }
}
}
/// Call `vkBindImageMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn bind_image_memory2(
device: &Device,
bind_infos: &[vk::BindImageMemoryInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.bind_image_memory2
.ok_or(CallError::MissingCommand("vkBindImageMemory2"))?;
let bind_info_count =
u32::try_from(bind_infos.len()).map_err(|_| CallError::CountOverflow(bind_infos.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, bind_infos.as_ptr()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkBindImageMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn bind_image_memory2(
&self,
bind_infos: &[vk::BindImageMemoryInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_image_memory2(self, bind_infos) }
}
}
/// Call `vkBindImageMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn bind_image_memory2_khr(
device: &Device,
bind_infos: &[vk::BindImageMemoryInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.bind_image_memory2_khr
.ok_or(CallError::MissingCommand("vkBindImageMemory2KHR"))?;
let bind_info_count =
u32::try_from(bind_infos.len()).map_err(|_| CallError::CountOverflow(bind_infos.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, bind_infos.as_ptr()) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkBindImageMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindImageMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn bind_image_memory2_khr(
&self,
bind_infos: &[vk::BindImageMemoryInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_image_memory2_khr(self, bind_infos) }
}
}
/// Call `vkCmdSetDeviceMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDeviceMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_device_mask(
device: &Device,
command_buffer: vk::CommandBuffer,
device_mask: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_device_mask
.ok_or(CallError::MissingCommand("vkCmdSetDeviceMask"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, device_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDeviceMask` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDeviceMask` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_device_mask(
&self,
command_buffer: vk::CommandBuffer,
device_mask: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_device_mask(self, command_buffer, device_mask) }
}
}
/// Call `vkCmdSetDeviceMaskKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDeviceMaskKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_device_mask_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
device_mask: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_device_mask_khr
.ok_or(CallError::MissingCommand("vkCmdSetDeviceMaskKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, device_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDeviceMaskKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDeviceMaskKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_device_mask_khr(
&self,
command_buffer: vk::CommandBuffer,
device_mask: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_device_mask_khr(self, command_buffer, device_mask) }
}
}
/// Call `vkGetDeviceGroupPresentCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPresentCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_group_present_capabilities_khr(
device: &Device,
p_device_group_present_capabilities: *mut vk::DeviceGroupPresentCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_group_present_capabilities_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceGroupPresentCapabilitiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_device_group_present_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceGroupPresentCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupPresentCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_group_present_capabilities_khr(
&self,
p_device_group_present_capabilities: *mut vk::DeviceGroupPresentCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_group_present_capabilities_khr(self, p_device_group_present_capabilities) }
}
}
/// Call `vkGetDeviceGroupSurfacePresentModesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupSurfacePresentModesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_group_surface_present_modes_khr(
device: &Device,
surface: vk::SurfaceKHR,
p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_group_surface_present_modes_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceGroupSurfacePresentModesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), surface, p_modes) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceGroupSurfacePresentModesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupSurfacePresentModesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_group_surface_present_modes_khr(
&self,
surface: vk::SurfaceKHR,
p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_group_surface_present_modes_khr(self, surface, p_modes) }
}
}
/// Call `vkAcquireNextImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireNextImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_next_image2_khr(
device: &Device,
p_acquire_info: *const vk::AcquireNextImageInfoKHR,
p_image_index: *mut u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.acquire_next_image2_khr
.ok_or(CallError::MissingCommand("vkAcquireNextImage2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_acquire_info, p_image_index) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkAcquireNextImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireNextImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_next_image2_khr(
&self,
p_acquire_info: *const vk::AcquireNextImageInfoKHR,
p_image_index: *mut u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_next_image2_khr(self, p_acquire_info, p_image_index) }
}
}
/// Call `vkCmdDispatchBase` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchBase` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_dispatch_base(
device: &Device,
command_buffer: vk::CommandBuffer,
base_group_x: u32,
base_group_y: u32,
base_group_z: u32,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_base
.ok_or(CallError::MissingCommand("vkCmdDispatchBase"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
base_group_x,
base_group_y,
base_group_z,
group_count_x,
group_count_y,
group_count_z,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDispatchBase` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchBase` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_dispatch_base(
&self,
command_buffer: vk::CommandBuffer,
base_group_x: u32,
base_group_y: u32,
base_group_z: u32,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_dispatch_base(
self,
command_buffer,
base_group_x,
base_group_y,
base_group_z,
group_count_x,
group_count_y,
group_count_z,
)
}
}
}
/// Call `vkCmdDispatchBaseKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchBaseKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_dispatch_base_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
base_group_x: u32,
base_group_y: u32,
base_group_z: u32,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_base_khr
.ok_or(CallError::MissingCommand("vkCmdDispatchBaseKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
base_group_x,
base_group_y,
base_group_z,
group_count_x,
group_count_y,
group_count_z,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDispatchBaseKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchBaseKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_dispatch_base_khr(
&self,
command_buffer: vk::CommandBuffer,
base_group_x: u32,
base_group_y: u32,
base_group_z: u32,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_dispatch_base_khr(
self,
command_buffer,
base_group_x,
base_group_y,
base_group_z,
group_count_x,
group_count_y,
group_count_z,
)
}
}
}
/// Call `vkGetPhysicalDevicePresentRectanglesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDevicePresentRectanglesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_present_rectangles_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_rect_count: *mut u32,
p_rects: *mut vk::Rect2D,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_present_rectangles_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDevicePresentRectanglesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, surface, p_rect_count, p_rects) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDevicePresentRectanglesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDevicePresentRectanglesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_present_rectangles_khr(
&self,
physical_device: vk::PhysicalDevice,
surface: vk::SurfaceKHR,
p_rect_count: *mut u32,
p_rects: *mut vk::Rect2D,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_present_rectangles_khr(
self,
physical_device,
surface,
p_rect_count,
p_rects,
)
}
}
}
/// Call `vkCreateDescriptorUpdateTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorUpdateTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_descriptor_update_template(
device: &Device,
create_info: &vk::DescriptorUpdateTemplateCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorUpdateTemplate, CallError> {
let __vk_function =
device
.fp()
.create_descriptor_update_template
.ok_or(CallError::MissingCommand(
"vkCreateDescriptorUpdateTemplate",
))?;
let mut output = vk::DescriptorUpdateTemplate::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateDescriptorUpdateTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorUpdateTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_descriptor_update_template(
&self,
create_info: &vk::DescriptorUpdateTemplateCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorUpdateTemplate, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_descriptor_update_template(self, create_info, allocator) }
}
}
/// Call `vkCreateDescriptorUpdateTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorUpdateTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_descriptor_update_template_khr(
device: &Device,
create_info: &vk::DescriptorUpdateTemplateCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorUpdateTemplate, CallError> {
let __vk_function =
device
.fp()
.create_descriptor_update_template_khr
.ok_or(CallError::MissingCommand(
"vkCreateDescriptorUpdateTemplateKHR",
))?;
let mut output = vk::DescriptorUpdateTemplate::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateDescriptorUpdateTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDescriptorUpdateTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_descriptor_update_template_khr(
&self,
create_info: &vk::DescriptorUpdateTemplateCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::DescriptorUpdateTemplate, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_descriptor_update_template_khr(self, create_info, allocator) }
}
}
/// Call `vkDestroyDescriptorUpdateTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorUpdateTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_descriptor_update_template(
device: &Device,
descriptor_update_template: vk::DescriptorUpdateTemplate,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_descriptor_update_template
.ok_or(CallError::MissingCommand(
"vkDestroyDescriptorUpdateTemplate",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_update_template,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyDescriptorUpdateTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorUpdateTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_descriptor_update_template(
&self,
descriptor_update_template: vk::DescriptorUpdateTemplate,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_descriptor_update_template(self, descriptor_update_template, allocator) }
}
}
/// Call `vkDestroyDescriptorUpdateTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorUpdateTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_descriptor_update_template_khr(
device: &Device,
descriptor_update_template: vk::DescriptorUpdateTemplate,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_descriptor_update_template_khr
.ok_or(CallError::MissingCommand(
"vkDestroyDescriptorUpdateTemplateKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_update_template,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroyDescriptorUpdateTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDescriptorUpdateTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_descriptor_update_template_khr(
&self,
descriptor_update_template: vk::DescriptorUpdateTemplate,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_descriptor_update_template_khr(self, descriptor_update_template, allocator) }
}
}
/// Call `vkUpdateDescriptorSetWithTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSetWithTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Data must address initialized descriptor payloads with the alignment, offsets,
/// strides and extent declared by descriptor_update_template. No byte size can
/// be inferred from this pointer; the caller guarantees the entire native read.
pub unsafe fn update_descriptor_set_with_template(
device: &Device,
descriptor_set: vk::DescriptorSet,
descriptor_update_template: vk::DescriptorUpdateTemplate,
data: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.update_descriptor_set_with_template
.ok_or(CallError::MissingCommand(
"vkUpdateDescriptorSetWithTemplate",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_set,
descriptor_update_template,
data,
)
};
Ok(())
}
impl Device {
/// Call `vkUpdateDescriptorSetWithTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSetWithTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Data must address initialized descriptor payloads with the alignment, offsets,
/// strides and extent declared by descriptor_update_template. No byte size can
/// be inferred from this pointer; the caller guarantees the entire native read.
#[inline]
pub unsafe fn update_descriptor_set_with_template(
&self,
descriptor_set: vk::DescriptorSet,
descriptor_update_template: vk::DescriptorUpdateTemplate,
data: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
update_descriptor_set_with_template(self, descriptor_set, descriptor_update_template, data)
}
}
}
/// Call `vkUpdateDescriptorSetWithTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSetWithTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Data must address initialized descriptor payloads with the alignment, offsets,
/// strides and extent declared by descriptor_update_template. No byte size can
/// be inferred from this pointer; the caller guarantees the entire native read.
pub unsafe fn update_descriptor_set_with_template_khr(
device: &Device,
descriptor_set: vk::DescriptorSet,
descriptor_update_template: vk::DescriptorUpdateTemplate,
data: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.update_descriptor_set_with_template_khr
.ok_or(CallError::MissingCommand(
"vkUpdateDescriptorSetWithTemplateKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
descriptor_set,
descriptor_update_template,
data,
)
};
Ok(())
}
impl Device {
/// Call `vkUpdateDescriptorSetWithTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateDescriptorSetWithTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Data must address initialized descriptor payloads with the alignment, offsets,
/// strides and extent declared by descriptor_update_template. No byte size can
/// be inferred from this pointer; the caller guarantees the entire native read.
#[inline]
pub unsafe fn update_descriptor_set_with_template_khr(
&self,
descriptor_set: vk::DescriptorSet,
descriptor_update_template: vk::DescriptorUpdateTemplate,
data: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
update_descriptor_set_with_template_khr(
self,
descriptor_set,
descriptor_update_template,
data,
)
}
}
}
/// Call `vkCmdPushDescriptorSetWithTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set_with_template(
device: &Device,
command_buffer: vk::CommandBuffer,
descriptor_update_template: vk::DescriptorUpdateTemplate,
layout: vk::PipelineLayout,
set: u32,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_push_descriptor_set_with_template
.ok_or(CallError::MissingCommand(
"vkCmdPushDescriptorSetWithTemplate",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
descriptor_update_template,
layout,
set,
p_data,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSetWithTemplate` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set_with_template(
&self,
command_buffer: vk::CommandBuffer,
descriptor_update_template: vk::DescriptorUpdateTemplate,
layout: vk::PipelineLayout,
set: u32,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set_with_template(
self,
command_buffer,
descriptor_update_template,
layout,
set,
p_data,
)
}
}
}
/// Call `vkCmdPushDescriptorSetWithTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set_with_template_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
descriptor_update_template: vk::DescriptorUpdateTemplate,
layout: vk::PipelineLayout,
set: u32,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set_with_template_khr
.ok_or(CallError::MissingCommand(
"vkCmdPushDescriptorSetWithTemplateKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
descriptor_update_template,
layout,
set,
p_data,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSetWithTemplateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set_with_template_khr(
&self,
command_buffer: vk::CommandBuffer,
descriptor_update_template: vk::DescriptorUpdateTemplate,
layout: vk::PipelineLayout,
set: u32,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set_with_template_khr(
self,
command_buffer,
descriptor_update_template,
layout,
set,
p_data,
)
}
}
}
/// Call `vkSetHdrMetadataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetHdrMetadataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_hdr_metadata_ext(
device: &Device,
swapchain_count: u32,
p_swapchains: *const vk::SwapchainKHR,
p_metadata: *const vk::HdrMetadataEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_hdr_metadata_ext
.ok_or(CallError::MissingCommand("vkSetHdrMetadataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), swapchain_count, p_swapchains, p_metadata) };
Ok(())
}
impl Device {
/// Call `vkSetHdrMetadataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetHdrMetadataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_hdr_metadata_ext(
&self,
swapchain_count: u32,
p_swapchains: *const vk::SwapchainKHR,
p_metadata: *const vk::HdrMetadataEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_hdr_metadata_ext(self, swapchain_count, p_swapchains, p_metadata) }
}
}
/// Call `vkGetSwapchainStatusKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainStatusKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_swapchain_status_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_swapchain_status_khr
.ok_or(CallError::MissingCommand("vkGetSwapchainStatusKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSwapchainStatusKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainStatusKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_swapchain_status_khr(
&self,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_swapchain_status_khr(self, swapchain) }
}
}
/// Call `vkGetRefreshCycleDurationGOOGLE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRefreshCycleDurationGOOGLE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_refresh_cycle_duration_google(
device: &Device,
swapchain: vk::SwapchainKHR,
p_display_timing_properties: *mut vk::RefreshCycleDurationGOOGLE,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_refresh_cycle_duration_google
.ok_or(CallError::MissingCommand("vkGetRefreshCycleDurationGOOGLE"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, p_display_timing_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetRefreshCycleDurationGOOGLE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRefreshCycleDurationGOOGLE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_refresh_cycle_duration_google(
&self,
swapchain: vk::SwapchainKHR,
p_display_timing_properties: *mut vk::RefreshCycleDurationGOOGLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_refresh_cycle_duration_google(self, swapchain, p_display_timing_properties) }
}
}
/// Call `vkGetPastPresentationTimingGOOGLE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPastPresentationTimingGOOGLE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_past_presentation_timing_google(
device: &Device,
swapchain: vk::SwapchainKHR,
p_presentation_timing_count: *mut u32,
p_presentation_timings: *mut vk::PastPresentationTimingGOOGLE,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_past_presentation_timing_google
.ok_or(CallError::MissingCommand(
"vkGetPastPresentationTimingGOOGLE",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain,
p_presentation_timing_count,
p_presentation_timings,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPastPresentationTimingGOOGLE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPastPresentationTimingGOOGLE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_past_presentation_timing_google(
&self,
swapchain: vk::SwapchainKHR,
p_presentation_timing_count: *mut u32,
p_presentation_timings: *mut vk::PastPresentationTimingGOOGLE,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_past_presentation_timing_google(
self,
swapchain,
p_presentation_timing_count,
p_presentation_timings,
)
}
}
}
#[cfg(feature = "platform-ios")]
/// Call `vkCreateIOSSurfaceMVK` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIOSSurfaceMVK` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_ios_surface_mvk(
instance: &Instance,
p_create_info: *const vk::IOSSurfaceCreateInfoMVK,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_ios_surface_mvk
.ok_or(CallError::MissingCommand("vkCreateIOSSurfaceMVK"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ios")]
impl Instance {
/// Call `vkCreateIOSSurfaceMVK` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateIOSSurfaceMVK` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_ios_surface_mvk(
&self,
p_create_info: *const vk::IOSSurfaceCreateInfoMVK,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_ios_surface_mvk(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-macos")]
/// Call `vkCreateMacOSSurfaceMVK` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMacOSSurfaceMVK` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_mac_os_surface_mvk(
instance: &Instance,
p_create_info: *const vk::MacOSSurfaceCreateInfoMVK,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_mac_os_surface_mvk
.ok_or(CallError::MissingCommand("vkCreateMacOSSurfaceMVK"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-macos")]
impl Instance {
/// Call `vkCreateMacOSSurfaceMVK` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMacOSSurfaceMVK` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_mac_os_surface_mvk(
&self,
p_create_info: *const vk::MacOSSurfaceCreateInfoMVK,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_mac_os_surface_mvk(self, p_create_info, p_allocator, p_surface) }
}
}
#[cfg(feature = "platform-metal")]
/// Call `vkCreateMetalSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMetalSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_metal_surface_ext(
instance: &Instance,
p_create_info: *const vk::MetalSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_metal_surface_ext
.ok_or(CallError::MissingCommand("vkCreateMetalSurfaceEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-metal")]
impl Instance {
/// Call `vkCreateMetalSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMetalSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_metal_surface_ext(
&self,
p_create_info: *const vk::MetalSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_metal_surface_ext(self, p_create_info, p_allocator, p_surface) }
}
}
/// Call `vkCmdSetViewportWScalingNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWScalingNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_w_scaling_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_viewport_w_scalings: *const vk::ViewportWScalingNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_viewport_w_scaling_nv
.ok_or(CallError::MissingCommand("vkCmdSetViewportWScalingNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_viewport,
viewport_count,
p_viewport_w_scalings,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportWScalingNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWScalingNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_w_scaling_nv(
&self,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_viewport_w_scalings: *const vk::ViewportWScalingNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_viewport_w_scaling_nv(
self,
command_buffer,
first_viewport,
viewport_count,
p_viewport_w_scalings,
)
}
}
}
/// Call `vkCmdSetDiscardRectangleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_discard_rectangle_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_discard_rectangle: u32,
discard_rectangle_count: u32,
p_discard_rectangles: *const vk::Rect2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_discard_rectangle_ext
.ok_or(CallError::MissingCommand("vkCmdSetDiscardRectangleEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_discard_rectangle,
discard_rectangle_count,
p_discard_rectangles,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetDiscardRectangleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_discard_rectangle_ext(
&self,
command_buffer: vk::CommandBuffer,
first_discard_rectangle: u32,
discard_rectangle_count: u32,
p_discard_rectangles: *const vk::Rect2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_discard_rectangle_ext(
self,
command_buffer,
first_discard_rectangle,
discard_rectangle_count,
p_discard_rectangles,
)
}
}
}
/// Call `vkCmdSetDiscardRectangleEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_discard_rectangle_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
discard_rectangle_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_discard_rectangle_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetDiscardRectangleEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, discard_rectangle_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDiscardRectangleEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_discard_rectangle_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
discard_rectangle_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_discard_rectangle_enable_ext(self, command_buffer, discard_rectangle_enable) }
}
}
/// Call `vkCmdSetDiscardRectangleModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_discard_rectangle_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
discard_rectangle_mode: vk::DiscardRectangleModeEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_discard_rectangle_mode_ext
.ok_or(CallError::MissingCommand("vkCmdSetDiscardRectangleModeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, discard_rectangle_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDiscardRectangleModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDiscardRectangleModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_discard_rectangle_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
discard_rectangle_mode: vk::DiscardRectangleModeEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_discard_rectangle_mode_ext(self, command_buffer, discard_rectangle_mode) }
}
}
/// Call `vkCmdSetSampleLocationsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleLocationsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_sample_locations_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_sample_locations_info: *const vk::SampleLocationsInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_sample_locations_ext
.ok_or(CallError::MissingCommand("vkCmdSetSampleLocationsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_sample_locations_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetSampleLocationsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleLocationsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_sample_locations_ext(
&self,
command_buffer: vk::CommandBuffer,
p_sample_locations_info: *const vk::SampleLocationsInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_sample_locations_ext(self, command_buffer, p_sample_locations_info) }
}
}
/// Call `vkGetPhysicalDeviceMultisamplePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMultisamplePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_multisample_properties_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
samples: vk::SampleCountFlagBits,
p_multisample_properties: *mut vk::MultisamplePropertiesEXT,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_multisample_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceMultisamplePropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(physical_device, samples, p_multisample_properties) };
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceMultisamplePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceMultisamplePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_multisample_properties_ext(
&self,
physical_device: vk::PhysicalDevice,
samples: vk::SampleCountFlagBits,
p_multisample_properties: *mut vk::MultisamplePropertiesEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_multisample_properties_ext(
self,
physical_device,
samples,
p_multisample_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceSurfaceCapabilities2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilities2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_capabilities2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_surface_capabilities: *mut vk::SurfaceCapabilities2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_capabilities2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceCapabilities2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_surface_info, p_surface_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceCapabilities2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceCapabilities2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_capabilities2_khr(
&self,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_surface_capabilities: *mut vk::SurfaceCapabilities2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_capabilities2_khr(
self,
physical_device,
p_surface_info,
p_surface_capabilities,
)
}
}
}
/// Call `vkGetPhysicalDeviceSurfaceFormats2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceFormats2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_formats2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_surface_format_count: *mut u32,
p_surface_formats: *mut vk::SurfaceFormat2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_formats2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfaceFormats2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_surface_info,
p_surface_format_count,
p_surface_formats,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSurfaceFormats2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfaceFormats2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_formats2_khr(
&self,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_surface_format_count: *mut u32,
p_surface_formats: *mut vk::SurfaceFormat2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_formats2_khr(
self,
physical_device,
p_surface_info,
p_surface_format_count,
p_surface_formats,
)
}
}
}
/// Call `vkGetPhysicalDeviceDisplayProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_display_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayProperties2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_display_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDisplayProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceDisplayProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_display_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayProperties2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_display_properties2_khr(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceDisplayPlaneProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPlaneProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_display_plane_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPlaneProperties2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_display_plane_properties2_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDisplayPlaneProperties2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceDisplayPlaneProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDisplayPlaneProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_display_plane_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayPlaneProperties2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_display_plane_properties2_khr(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetDisplayModeProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayModeProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_display_mode_properties2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayModeProperties2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_display_mode_properties2_khr
.ok_or(CallError::MissingCommand("vkGetDisplayModeProperties2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, display, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDisplayModeProperties2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayModeProperties2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_display_mode_properties2_khr(
&self,
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
p_property_count: *mut u32,
p_properties: *mut vk::DisplayModeProperties2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_display_mode_properties2_khr(
self,
physical_device,
display,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetDisplayPlaneCapabilities2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneCapabilities2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_display_plane_capabilities2_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_display_plane_info: *const vk::DisplayPlaneInfo2KHR,
p_capabilities: *mut vk::DisplayPlaneCapabilities2KHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
instance
.fp()
.get_display_plane_capabilities2_khr
.ok_or(CallError::MissingCommand(
"vkGetDisplayPlaneCapabilities2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_display_plane_info, p_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDisplayPlaneCapabilities2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDisplayPlaneCapabilities2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_display_plane_capabilities2_khr(
&self,
physical_device: vk::PhysicalDevice,
p_display_plane_info: *const vk::DisplayPlaneInfo2KHR,
p_capabilities: *mut vk::DisplayPlaneCapabilities2KHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_display_plane_capabilities2_khr(
self,
physical_device,
p_display_plane_info,
p_capabilities,
)
}
}
}
/// Call `vkGetBufferMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_buffer_memory_requirements2(
device: &Device,
info: &vk::BufferMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_buffer_memory_requirements2
.ok_or(CallError::MissingCommand("vkGetBufferMemoryRequirements2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), info, memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetBufferMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_buffer_memory_requirements2(
&self,
info: &vk::BufferMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_memory_requirements2(self, info, memory_requirements) }
}
}
/// Call `vkGetBufferMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_buffer_memory_requirements2_khr(
device: &Device,
info: &vk::BufferMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_buffer_memory_requirements2_khr
.ok_or(CallError::MissingCommand(
"vkGetBufferMemoryRequirements2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), info, memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetBufferMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_buffer_memory_requirements2_khr(
&self,
info: &vk::BufferMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_memory_requirements2_khr(self, info, memory_requirements) }
}
}
/// Call `vkGetImageMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_image_memory_requirements2(
device: &Device,
info: &vk::ImageMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_memory_requirements2
.ok_or(CallError::MissingCommand("vkGetImageMemoryRequirements2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), info, memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetImageMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_image_memory_requirements2(
&self,
info: &vk::ImageMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_memory_requirements2(self, info, memory_requirements) }
}
}
/// Call `vkGetImageMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_image_memory_requirements2_khr(
device: &Device,
info: &vk::ImageMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_image_memory_requirements2_khr
.ok_or(CallError::MissingCommand(
"vkGetImageMemoryRequirements2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), info, memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetImageMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_image_memory_requirements2_khr(
&self,
info: &vk::ImageMemoryRequirementsInfo2,
memory_requirements: &mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_memory_requirements2_khr(self, info, memory_requirements) }
}
}
/// Call `vkGetImageSparseMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_image_sparse_memory_requirements2(
device: &Device,
info: &vk::ImageSparseMemoryRequirementsInfo2,
sparse_memory_requirement_count: &mut u32,
sparse_memory_requirements: Option<&mut [vk::SparseImageMemoryRequirements2]>,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_image_sparse_memory_requirements2
.ok_or(CallError::MissingCommand(
"vkGetImageSparseMemoryRequirements2",
))?;
let capacity = sparse_memory_requirements
.as_ref()
.map(|values| values.len());
if let Some(capacity) = capacity {
*sparse_memory_requirement_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values =
sparse_memory_requirements.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
info,
sparse_memory_requirement_count,
values,
)
};
if capacity.is_some_and(|capacity| u64::from(*sparse_memory_requirement_count) > capacity as u64)
{
return Err(CallError::InvalidOutput(
"vkGetImageSparseMemoryRequirements2",
));
}
Ok(())
}
impl Device {
/// Call `vkGetImageSparseMemoryRequirements2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_image_sparse_memory_requirements2(
&self,
info: &vk::ImageSparseMemoryRequirementsInfo2,
sparse_memory_requirement_count: &mut u32,
sparse_memory_requirements: Option<&mut [vk::SparseImageMemoryRequirements2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_image_sparse_memory_requirements2(
self,
info,
sparse_memory_requirement_count,
sparse_memory_requirements,
)
}
}
}
/// Call `vkGetImageSparseMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
pub unsafe fn get_image_sparse_memory_requirements2_khr(
device: &Device,
info: &vk::ImageSparseMemoryRequirementsInfo2,
sparse_memory_requirement_count: &mut u32,
sparse_memory_requirements: Option<&mut [vk::SparseImageMemoryRequirements2]>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_sparse_memory_requirements2_khr
.ok_or(CallError::MissingCommand(
"vkGetImageSparseMemoryRequirements2KHR",
))?;
let capacity = sparse_memory_requirements
.as_ref()
.map(|values| values.len());
if let Some(capacity) = capacity {
*sparse_memory_requirement_count =
u32::try_from(capacity).map_err(|_| CallError::CountOverflow(capacity))?;
}
let values =
sparse_memory_requirements.map_or(std::ptr::null_mut(), |values| values.as_mut_ptr());
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
info,
sparse_memory_requirement_count,
values,
)
};
if capacity.is_some_and(|capacity| u64::from(*sparse_memory_requirement_count) > capacity as u64)
{
return Err(CallError::InvalidOutput(
"vkGetImageSparseMemoryRequirements2KHR",
));
}
Ok(())
}
impl Device {
/// Call `vkGetImageSparseMemoryRequirements2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSparseMemoryRequirements2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Pass None to query the count, or Some with fully initialized output records
/// and live, valid output chains. The slice length supplies native capacity;
/// count receives the native number available/written. Some(empty) is a zero-
/// capacity fill, not a count query. No allocation, retry, header reset or chain
/// replacement occurs. Handle INCOMPLETE (result queries) or re-query for growth
/// (void queries) explicitly. Output contents after native errors follow Vulkan.
#[inline]
pub unsafe fn get_image_sparse_memory_requirements2_khr(
&self,
info: &vk::ImageSparseMemoryRequirementsInfo2,
sparse_memory_requirement_count: &mut u32,
sparse_memory_requirements: Option<&mut [vk::SparseImageMemoryRequirements2]>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_image_sparse_memory_requirements2_khr(
self,
info,
sparse_memory_requirement_count,
sparse_memory_requirements,
)
}
}
}
/// Call `vkGetDeviceBufferMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceBufferMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_buffer_memory_requirements(
device: &Device,
p_info: *const vk::DeviceBufferMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_buffer_memory_requirements
.ok_or(CallError::MissingCommand(
"vkGetDeviceBufferMemoryRequirements",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceBufferMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceBufferMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_buffer_memory_requirements(
&self,
p_info: *const vk::DeviceBufferMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_buffer_memory_requirements(self, p_info, p_memory_requirements) }
}
}
/// Call `vkGetDeviceBufferMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceBufferMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_buffer_memory_requirements_khr(
device: &Device,
p_info: *const vk::DeviceBufferMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_buffer_memory_requirements_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceBufferMemoryRequirementsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceBufferMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceBufferMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_buffer_memory_requirements_khr(
&self,
p_info: *const vk::DeviceBufferMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_buffer_memory_requirements_khr(self, p_info, p_memory_requirements) }
}
}
/// Call `vkGetDeviceImageMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_memory_requirements(
device: &Device,
p_info: *const vk::DeviceImageMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_image_memory_requirements
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageMemoryRequirements",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_memory_requirements(
&self,
p_info: *const vk::DeviceImageMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_image_memory_requirements(self, p_info, p_memory_requirements) }
}
}
/// Call `vkGetDeviceImageMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_memory_requirements_khr(
device: &Device,
p_info: *const vk::DeviceImageMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_image_memory_requirements_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageMemoryRequirementsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_memory_requirements_khr(
&self,
p_info: *const vk::DeviceImageMemoryRequirements,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_image_memory_requirements_khr(self, p_info, p_memory_requirements) }
}
}
/// Call `vkGetDeviceImageSparseMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSparseMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_sparse_memory_requirements(
device: &Device,
p_info: *const vk::DeviceImageMemoryRequirements,
p_sparse_memory_requirement_count: *mut u32,
p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_image_sparse_memory_requirements
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageSparseMemoryRequirements",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
p_info,
p_sparse_memory_requirement_count,
p_sparse_memory_requirements,
)
};
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageSparseMemoryRequirements` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSparseMemoryRequirements` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_sparse_memory_requirements(
&self,
p_info: *const vk::DeviceImageMemoryRequirements,
p_sparse_memory_requirement_count: *mut u32,
p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_image_sparse_memory_requirements(
self,
p_info,
p_sparse_memory_requirement_count,
p_sparse_memory_requirements,
)
}
}
}
/// Call `vkGetDeviceImageSparseMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSparseMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_sparse_memory_requirements_khr(
device: &Device,
p_info: *const vk::DeviceImageMemoryRequirements,
p_sparse_memory_requirement_count: *mut u32,
p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_image_sparse_memory_requirements_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageSparseMemoryRequirementsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
p_info,
p_sparse_memory_requirement_count,
p_sparse_memory_requirements,
)
};
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageSparseMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSparseMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_sparse_memory_requirements_khr(
&self,
p_info: *const vk::DeviceImageMemoryRequirements,
p_sparse_memory_requirement_count: *mut u32,
p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_image_sparse_memory_requirements_khr(
self,
p_info,
p_sparse_memory_requirement_count,
p_sparse_memory_requirements,
)
}
}
}
/// Call `vkCreateSamplerYcbcrConversion` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSamplerYcbcrConversion` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_sampler_ycbcr_conversion(
device: &Device,
create_info: &vk::SamplerYcbcrConversionCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::SamplerYcbcrConversion, CallError> {
let __vk_function = device
.fp()
.create_sampler_ycbcr_conversion
.ok_or(CallError::MissingCommand("vkCreateSamplerYcbcrConversion"))?;
let mut output = vk::SamplerYcbcrConversion::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateSamplerYcbcrConversion` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSamplerYcbcrConversion` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_sampler_ycbcr_conversion(
&self,
create_info: &vk::SamplerYcbcrConversionCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::SamplerYcbcrConversion, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_sampler_ycbcr_conversion(self, create_info, allocator) }
}
}
/// Call `vkCreateSamplerYcbcrConversionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSamplerYcbcrConversionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_sampler_ycbcr_conversion_khr(
device: &Device,
create_info: &vk::SamplerYcbcrConversionCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::SamplerYcbcrConversion, CallError> {
let __vk_function =
device
.fp()
.create_sampler_ycbcr_conversion_khr
.ok_or(CallError::MissingCommand(
"vkCreateSamplerYcbcrConversionKHR",
))?;
let mut output = vk::SamplerYcbcrConversion::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateSamplerYcbcrConversionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateSamplerYcbcrConversionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_sampler_ycbcr_conversion_khr(
&self,
create_info: &vk::SamplerYcbcrConversionCreateInfo,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::SamplerYcbcrConversion, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_sampler_ycbcr_conversion_khr(self, create_info, allocator) }
}
}
/// Call `vkDestroySamplerYcbcrConversion` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySamplerYcbcrConversion` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_sampler_ycbcr_conversion(
device: &Device,
ycbcr_conversion: vk::SamplerYcbcrConversion,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_sampler_ycbcr_conversion
.ok_or(CallError::MissingCommand("vkDestroySamplerYcbcrConversion"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
ycbcr_conversion,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroySamplerYcbcrConversion` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySamplerYcbcrConversion` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_sampler_ycbcr_conversion(
&self,
ycbcr_conversion: vk::SamplerYcbcrConversion,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_sampler_ycbcr_conversion(self, ycbcr_conversion, allocator) }
}
}
/// Call `vkDestroySamplerYcbcrConversionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySamplerYcbcrConversionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn destroy_sampler_ycbcr_conversion_khr(
device: &Device,
ycbcr_conversion: vk::SamplerYcbcrConversion,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_sampler_ycbcr_conversion_khr
.ok_or(CallError::MissingCommand(
"vkDestroySamplerYcbcrConversionKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
ycbcr_conversion,
allocator.map_or(std::ptr::null(), |value| value),
)
};
Ok(())
}
impl Device {
/// Call `vkDestroySamplerYcbcrConversionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroySamplerYcbcrConversionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn destroy_sampler_ycbcr_conversion_khr(
&self,
ycbcr_conversion: vk::SamplerYcbcrConversion,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_sampler_ycbcr_conversion_khr(self, ycbcr_conversion, allocator) }
}
}
/// Call `vkGetDeviceQueue2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceQueue2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_device_queue2(
device: &Device,
queue_info: &vk::DeviceQueueInfo2,
queue: &mut vk::Queue,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_queue2
.ok_or(CallError::MissingCommand("vkGetDeviceQueue2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), queue_info, queue) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceQueue2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceQueue2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_device_queue2(
&self,
queue_info: &vk::DeviceQueueInfo2,
queue: &mut vk::Queue,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_queue2(self, queue_info, queue) }
}
}
/// Call `vkCreateValidationCacheEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateValidationCacheEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_validation_cache_ext(
device: &Device,
p_create_info: *const vk::ValidationCacheCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_validation_cache: *mut vk::ValidationCacheEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_validation_cache_ext
.ok_or(CallError::MissingCommand("vkCreateValidationCacheEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_validation_cache,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateValidationCacheEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateValidationCacheEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_validation_cache_ext(
&self,
p_create_info: *const vk::ValidationCacheCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_validation_cache: *mut vk::ValidationCacheEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_validation_cache_ext(self, p_create_info, p_allocator, p_validation_cache) }
}
}
/// Call `vkDestroyValidationCacheEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyValidationCacheEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_validation_cache_ext(
device: &Device,
validation_cache: vk::ValidationCacheEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_validation_cache_ext
.ok_or(CallError::MissingCommand("vkDestroyValidationCacheEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), validation_cache, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyValidationCacheEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyValidationCacheEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_validation_cache_ext(
&self,
validation_cache: vk::ValidationCacheEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_validation_cache_ext(self, validation_cache, p_allocator) }
}
}
/// Call `vkGetValidationCacheDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetValidationCacheDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_validation_cache_data_ext(
device: &Device,
validation_cache: vk::ValidationCacheEXT,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_validation_cache_data_ext
.ok_or(CallError::MissingCommand("vkGetValidationCacheDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), validation_cache, p_data_size, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetValidationCacheDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetValidationCacheDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_validation_cache_data_ext(
&self,
validation_cache: vk::ValidationCacheEXT,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_validation_cache_data_ext(self, validation_cache, p_data_size, p_data) }
}
}
/// Call `vkMergeValidationCachesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMergeValidationCachesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn merge_validation_caches_ext(
device: &Device,
dst_cache: vk::ValidationCacheEXT,
src_cache_count: u32,
p_src_caches: *const vk::ValidationCacheEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.merge_validation_caches_ext
.ok_or(CallError::MissingCommand("vkMergeValidationCachesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), dst_cache, src_cache_count, p_src_caches) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkMergeValidationCachesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMergeValidationCachesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn merge_validation_caches_ext(
&self,
dst_cache: vk::ValidationCacheEXT,
src_cache_count: u32,
p_src_caches: *const vk::ValidationCacheEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { merge_validation_caches_ext(self, dst_cache, src_cache_count, p_src_caches) }
}
}
/// Call `vkGetDescriptorSetLayoutSupport` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSupport` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_descriptor_set_layout_support(
device: &Device,
create_info: &vk::DescriptorSetLayoutCreateInfo,
support: &mut vk::DescriptorSetLayoutSupport,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_descriptor_set_layout_support
.ok_or(CallError::MissingCommand("vkGetDescriptorSetLayoutSupport"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), create_info, support) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetLayoutSupport` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSupport` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_descriptor_set_layout_support(
&self,
create_info: &vk::DescriptorSetLayoutCreateInfo,
support: &mut vk::DescriptorSetLayoutSupport,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_set_layout_support(self, create_info, support) }
}
}
/// Call `vkGetDescriptorSetLayoutSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_descriptor_set_layout_support_khr(
device: &Device,
create_info: &vk::DescriptorSetLayoutCreateInfo,
support: &mut vk::DescriptorSetLayoutSupport,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_descriptor_set_layout_support_khr
.ok_or(CallError::MissingCommand(
"vkGetDescriptorSetLayoutSupportKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), create_info, support) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetLayoutSupportKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSupportKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_descriptor_set_layout_support_khr(
&self,
create_info: &vk::DescriptorSetLayoutCreateInfo,
support: &mut vk::DescriptorSetLayoutSupport,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_set_layout_support_khr(self, create_info, support) }
}
}
/// Call `vkGetShaderInfoAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderInfoAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_shader_info_amd(
device: &Device,
pipeline: vk::Pipeline,
shader_stage: vk::ShaderStageFlagBits,
info_type: vk::ShaderInfoTypeAMD,
p_info_size: *mut usize,
p_info: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_shader_info_amd
.ok_or(CallError::MissingCommand("vkGetShaderInfoAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline,
shader_stage,
info_type,
p_info_size,
p_info,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetShaderInfoAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderInfoAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_shader_info_amd(
&self,
pipeline: vk::Pipeline,
shader_stage: vk::ShaderStageFlagBits,
info_type: vk::ShaderInfoTypeAMD,
p_info_size: *mut usize,
p_info: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_shader_info_amd(self, pipeline, shader_stage, info_type, p_info_size, p_info) }
}
}
/// Call `vkSetLocalDimmingAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLocalDimmingAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_local_dimming_amd(
device: &Device,
swap_chain: vk::SwapchainKHR,
local_dimming_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_local_dimming_amd
.ok_or(CallError::MissingCommand("vkSetLocalDimmingAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), swap_chain, local_dimming_enable) };
Ok(())
}
impl Device {
/// Call `vkSetLocalDimmingAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLocalDimmingAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_local_dimming_amd(
&self,
swap_chain: vk::SwapchainKHR,
local_dimming_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_local_dimming_amd(self, swap_chain, local_dimming_enable) }
}
}
/// Call `vkGetPhysicalDeviceCalibrateableTimeDomainsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCalibrateableTimeDomainsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_calibrateable_time_domains_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_time_domain_count: *mut u32,
p_time_domains: *mut vk::TimeDomainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_calibrateable_time_domains_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCalibrateableTimeDomainsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_time_domain_count, p_time_domains) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCalibrateableTimeDomainsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCalibrateableTimeDomainsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_calibrateable_time_domains_khr(
&self,
physical_device: vk::PhysicalDevice,
p_time_domain_count: *mut u32,
p_time_domains: *mut vk::TimeDomainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_calibrateable_time_domains_khr(
self,
physical_device,
p_time_domain_count,
p_time_domains,
)
}
}
}
/// Call `vkGetPhysicalDeviceCalibrateableTimeDomainsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCalibrateableTimeDomainsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_calibrateable_time_domains_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_time_domain_count: *mut u32,
p_time_domains: *mut vk::TimeDomainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_calibrateable_time_domains_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCalibrateableTimeDomainsEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_time_domain_count, p_time_domains) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCalibrateableTimeDomainsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCalibrateableTimeDomainsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_calibrateable_time_domains_ext(
&self,
physical_device: vk::PhysicalDevice,
p_time_domain_count: *mut u32,
p_time_domains: *mut vk::TimeDomainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_calibrateable_time_domains_ext(
self,
physical_device,
p_time_domain_count,
p_time_domains,
)
}
}
}
/// Call `vkGetCalibratedTimestampsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCalibratedTimestampsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_calibrated_timestamps_khr(
device: &Device,
timestamp_count: u32,
p_timestamp_infos: *const vk::CalibratedTimestampInfoKHR,
p_timestamps: *mut u64,
p_max_deviation: *mut u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_calibrated_timestamps_khr
.ok_or(CallError::MissingCommand("vkGetCalibratedTimestampsKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
timestamp_count,
p_timestamp_infos,
p_timestamps,
p_max_deviation,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetCalibratedTimestampsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCalibratedTimestampsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_calibrated_timestamps_khr(
&self,
timestamp_count: u32,
p_timestamp_infos: *const vk::CalibratedTimestampInfoKHR,
p_timestamps: *mut u64,
p_max_deviation: *mut u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_calibrated_timestamps_khr(
self,
timestamp_count,
p_timestamp_infos,
p_timestamps,
p_max_deviation,
)
}
}
}
/// Call `vkGetCalibratedTimestampsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCalibratedTimestampsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_calibrated_timestamps_ext(
device: &Device,
timestamp_count: u32,
p_timestamp_infos: *const vk::CalibratedTimestampInfoKHR,
p_timestamps: *mut u64,
p_max_deviation: *mut u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_calibrated_timestamps_ext
.ok_or(CallError::MissingCommand("vkGetCalibratedTimestampsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
timestamp_count,
p_timestamp_infos,
p_timestamps,
p_max_deviation,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetCalibratedTimestampsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCalibratedTimestampsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_calibrated_timestamps_ext(
&self,
timestamp_count: u32,
p_timestamp_infos: *const vk::CalibratedTimestampInfoKHR,
p_timestamps: *mut u64,
p_max_deviation: *mut u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_calibrated_timestamps_ext(
self,
timestamp_count,
p_timestamp_infos,
p_timestamps,
p_max_deviation,
)
}
}
}
/// Call `vkSetDebugUtilsObjectNameEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDebugUtilsObjectNameEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_debug_utils_object_name_ext(
device: &Device,
p_name_info: *const vk::DebugUtilsObjectNameInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_debug_utils_object_name_ext
.ok_or(CallError::MissingCommand("vkSetDebugUtilsObjectNameEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_name_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetDebugUtilsObjectNameEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDebugUtilsObjectNameEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_debug_utils_object_name_ext(
&self,
p_name_info: *const vk::DebugUtilsObjectNameInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_debug_utils_object_name_ext(self, p_name_info) }
}
}
/// Call `vkSetDebugUtilsObjectTagEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDebugUtilsObjectTagEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_debug_utils_object_tag_ext(
device: &Device,
p_tag_info: *const vk::DebugUtilsObjectTagInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_debug_utils_object_tag_ext
.ok_or(CallError::MissingCommand("vkSetDebugUtilsObjectTagEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_tag_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetDebugUtilsObjectTagEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDebugUtilsObjectTagEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_debug_utils_object_tag_ext(
&self,
p_tag_info: *const vk::DebugUtilsObjectTagInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_debug_utils_object_tag_ext(self, p_tag_info) }
}
}
/// Call `vkQueueBeginDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueBeginDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_begin_debug_utils_label_ext(
device: &Device,
queue: vk::Queue,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_begin_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkQueueBeginDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, p_label_info) };
Ok(())
}
impl Device {
/// Call `vkQueueBeginDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueBeginDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_begin_debug_utils_label_ext(
&self,
queue: vk::Queue,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_begin_debug_utils_label_ext(self, queue, p_label_info) }
}
}
/// Call `vkQueueEndDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueEndDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_end_debug_utils_label_ext(
device: &Device,
queue: vk::Queue,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_end_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkQueueEndDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue) };
Ok(())
}
impl Device {
/// Call `vkQueueEndDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueEndDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_end_debug_utils_label_ext(&self, queue: vk::Queue) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_end_debug_utils_label_ext(self, queue) }
}
}
/// Call `vkQueueInsertDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueInsertDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_insert_debug_utils_label_ext(
device: &Device,
queue: vk::Queue,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_insert_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkQueueInsertDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, p_label_info) };
Ok(())
}
impl Device {
/// Call `vkQueueInsertDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueInsertDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_insert_debug_utils_label_ext(
&self,
queue: vk::Queue,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_insert_debug_utils_label_ext(self, queue, p_label_info) }
}
}
/// Call `vkCmdBeginDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_debug_utils_label_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkCmdBeginDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_label_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_debug_utils_label_ext(
&self,
command_buffer: vk::CommandBuffer,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_debug_utils_label_ext(self, command_buffer, p_label_info) }
}
}
/// Call `vkCmdEndDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_debug_utils_label_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkCmdEndDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_debug_utils_label_ext(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_debug_utils_label_ext(self, command_buffer) }
}
}
/// Call `vkCmdInsertDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdInsertDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_insert_debug_utils_label_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_insert_debug_utils_label_ext
.ok_or(CallError::MissingCommand("vkCmdInsertDebugUtilsLabelEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_label_info) };
Ok(())
}
impl Device {
/// Call `vkCmdInsertDebugUtilsLabelEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdInsertDebugUtilsLabelEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_insert_debug_utils_label_ext(
&self,
command_buffer: vk::CommandBuffer,
p_label_info: *const vk::DebugUtilsLabelEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_insert_debug_utils_label_ext(self, command_buffer, p_label_info) }
}
}
/// Call `vkCreateDebugUtilsMessengerEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDebugUtilsMessengerEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_debug_utils_messenger_ext(
instance: &Instance,
p_create_info: *const vk::DebugUtilsMessengerCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_messenger: *mut vk::DebugUtilsMessengerEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_debug_utils_messenger_ext
.ok_or(CallError::MissingCommand("vkCreateDebugUtilsMessengerEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_messenger) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkCreateDebugUtilsMessengerEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDebugUtilsMessengerEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_debug_utils_messenger_ext(
&self,
p_create_info: *const vk::DebugUtilsMessengerCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_messenger: *mut vk::DebugUtilsMessengerEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_debug_utils_messenger_ext(self, p_create_info, p_allocator, p_messenger) }
}
}
/// Call `vkDestroyDebugUtilsMessengerEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDebugUtilsMessengerEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_debug_utils_messenger_ext(
instance: &Instance,
messenger: vk::DebugUtilsMessengerEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.destroy_debug_utils_messenger_ext
.ok_or(CallError::MissingCommand("vkDestroyDebugUtilsMessengerEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(instance.handle(), messenger, p_allocator) };
Ok(())
}
impl Instance {
/// Call `vkDestroyDebugUtilsMessengerEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDebugUtilsMessengerEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_debug_utils_messenger_ext(
&self,
messenger: vk::DebugUtilsMessengerEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_debug_utils_messenger_ext(self, messenger, p_allocator) }
}
}
/// Call `vkSubmitDebugUtilsMessageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSubmitDebugUtilsMessageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn submit_debug_utils_message_ext(
instance: &Instance,
message_severity: vk::DebugUtilsMessageSeverityFlagBitsEXT,
message_types: vk::DebugUtilsMessageTypeFlagsEXT,
p_callback_data: *const vk::DebugUtilsMessengerCallbackDataEXT,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.submit_debug_utils_message_ext
.ok_or(CallError::MissingCommand("vkSubmitDebugUtilsMessageEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
instance.handle(),
message_severity,
message_types,
p_callback_data,
)
};
Ok(())
}
impl Instance {
/// Call `vkSubmitDebugUtilsMessageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSubmitDebugUtilsMessageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn submit_debug_utils_message_ext(
&self,
message_severity: vk::DebugUtilsMessageSeverityFlagBitsEXT,
message_types: vk::DebugUtilsMessageTypeFlagsEXT,
p_callback_data: *const vk::DebugUtilsMessengerCallbackDataEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
submit_debug_utils_message_ext(self, message_severity, message_types, p_callback_data)
}
}
}
/// Call `vkGetMemoryHostPointerPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryHostPointerPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_host_pointer_properties_ext(
device: &Device,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
p_host_pointer: *const std::ffi::c_void,
p_memory_host_pointer_properties: *mut vk::MemoryHostPointerPropertiesEXT,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_memory_host_pointer_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetMemoryHostPointerPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
handle_type,
p_host_pointer,
p_memory_host_pointer_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetMemoryHostPointerPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryHostPointerPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_host_pointer_properties_ext(
&self,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
p_host_pointer: *const std::ffi::c_void,
p_memory_host_pointer_properties: *mut vk::MemoryHostPointerPropertiesEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_memory_host_pointer_properties_ext(
self,
handle_type,
p_host_pointer,
p_memory_host_pointer_properties,
)
}
}
}
/// Call `vkCmdWriteBufferMarkerAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteBufferMarkerAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_buffer_marker_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_stage: vk::PipelineStageFlagBits,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
marker: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_buffer_marker_amd
.ok_or(CallError::MissingCommand("vkCmdWriteBufferMarkerAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
pipeline_stage,
dst_buffer,
dst_offset,
marker,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWriteBufferMarkerAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteBufferMarkerAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_buffer_marker_amd(
&self,
command_buffer: vk::CommandBuffer,
pipeline_stage: vk::PipelineStageFlagBits,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
marker: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_write_buffer_marker_amd(
self,
command_buffer,
pipeline_stage,
dst_buffer,
dst_offset,
marker,
)
}
}
}
/// Call `vkCreateRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_render_pass2(
device: &Device,
create_info: &vk::RenderPassCreateInfo2,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
let __vk_function = device
.fp()
.create_render_pass2
.ok_or(CallError::MissingCommand("vkCreateRenderPass2"))?;
let mut output = vk::RenderPass::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_render_pass2(
&self,
create_info: &vk::RenderPassCreateInfo2,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_render_pass2(self, create_info, allocator) }
}
}
/// Call `vkCreateRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn create_render_pass2_khr(
device: &Device,
create_info: &vk::RenderPassCreateInfo2,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
let __vk_function = device
.fp()
.create_render_pass2_khr
.ok_or(CallError::MissingCommand("vkCreateRenderPass2KHR"))?;
let mut output = vk::RenderPass::NULL;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info,
allocator.map_or(std::ptr::null(), |value| value),
&mut output,
)
};
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(output)
}
impl Device {
/// Call `vkCreateRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn create_render_pass2_khr(
&self,
create_info: &vk::RenderPassCreateInfo2,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<vk::RenderPass, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_render_pass2_khr(self, create_info, allocator) }
}
}
/// Call `vkCmdBeginRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_begin_render_pass2(
device: &Device,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
subpass_begin_info: &vk::SubpassBeginInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_render_pass2
.ok_or(CallError::MissingCommand("vkCmdBeginRenderPass2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, render_pass_begin, subpass_begin_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_begin_render_pass2(
&self,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
subpass_begin_info: &vk::SubpassBeginInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_render_pass2(self, command_buffer, render_pass_begin, subpass_begin_info) }
}
}
/// Call `vkCmdBeginRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_begin_render_pass2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
subpass_begin_info: &vk::SubpassBeginInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_render_pass2_khr
.ok_or(CallError::MissingCommand("vkCmdBeginRenderPass2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, render_pass_begin, subpass_begin_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_begin_render_pass2_khr(
&self,
command_buffer: vk::CommandBuffer,
render_pass_begin: &vk::RenderPassBeginInfo,
subpass_begin_info: &vk::SubpassBeginInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_render_pass2_khr(self, command_buffer, render_pass_begin, subpass_begin_info)
}
}
}
/// Call `vkCmdNextSubpass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_next_subpass2(
device: &Device,
command_buffer: vk::CommandBuffer,
subpass_begin_info: &vk::SubpassBeginInfo,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_next_subpass2
.ok_or(CallError::MissingCommand("vkCmdNextSubpass2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, subpass_begin_info, subpass_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdNextSubpass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_next_subpass2(
&self,
command_buffer: vk::CommandBuffer,
subpass_begin_info: &vk::SubpassBeginInfo,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_next_subpass2(self, command_buffer, subpass_begin_info, subpass_end_info) }
}
}
/// Call `vkCmdNextSubpass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_next_subpass2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
subpass_begin_info: &vk::SubpassBeginInfo,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_next_subpass2_khr
.ok_or(CallError::MissingCommand("vkCmdNextSubpass2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, subpass_begin_info, subpass_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdNextSubpass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdNextSubpass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_next_subpass2_khr(
&self,
command_buffer: vk::CommandBuffer,
subpass_begin_info: &vk::SubpassBeginInfo,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_next_subpass2_khr(self, command_buffer, subpass_begin_info, subpass_end_info) }
}
}
/// Call `vkCmdEndRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_end_render_pass2(
device: &Device,
command_buffer: vk::CommandBuffer,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_render_pass2
.ok_or(CallError::MissingCommand("vkCmdEndRenderPass2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, subpass_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRenderPass2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_end_render_pass2(
&self,
command_buffer: vk::CommandBuffer,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_render_pass2(self, command_buffer, subpass_end_info) }
}
}
/// Call `vkCmdEndRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_end_render_pass2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_render_pass2_khr
.ok_or(CallError::MissingCommand("vkCmdEndRenderPass2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, subpass_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRenderPass2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderPass2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_end_render_pass2_khr(
&self,
command_buffer: vk::CommandBuffer,
subpass_end_info: &vk::SubpassEndInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_render_pass2_khr(self, command_buffer, subpass_end_info) }
}
}
/// Call `vkGetSemaphoreCounterValue` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreCounterValue` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_semaphore_counter_value(
device: &Device,
semaphore: vk::Semaphore,
value: &mut u64,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_semaphore_counter_value
.ok_or(CallError::MissingCommand("vkGetSemaphoreCounterValue"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), semaphore, value) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkGetSemaphoreCounterValue` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreCounterValue` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_semaphore_counter_value(
&self,
semaphore: vk::Semaphore,
value: &mut u64,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_semaphore_counter_value(self, semaphore, value) }
}
}
/// Call `vkGetSemaphoreCounterValueKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreCounterValueKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn get_semaphore_counter_value_khr(
device: &Device,
semaphore: vk::Semaphore,
value: &mut u64,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_semaphore_counter_value_khr
.ok_or(CallError::MissingCommand("vkGetSemaphoreCounterValueKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), semaphore, value) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkGetSemaphoreCounterValueKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSemaphoreCounterValueKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn get_semaphore_counter_value_khr(
&self,
semaphore: vk::Semaphore,
value: &mut u64,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_semaphore_counter_value_khr(self, semaphore, value) }
}
}
/// Call `vkWaitSemaphores` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitSemaphores` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn wait_semaphores(
device: &Device,
wait_info: &vk::SemaphoreWaitInfo,
timeout: u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.wait_semaphores
.ok_or(CallError::MissingCommand("vkWaitSemaphores"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), wait_info, timeout) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWaitSemaphores` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitSemaphores` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn wait_semaphores(
&self,
wait_info: &vk::SemaphoreWaitInfo,
timeout: u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { wait_semaphores(self, wait_info, timeout) }
}
}
/// Call `vkWaitSemaphoresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitSemaphoresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn wait_semaphores_khr(
device: &Device,
wait_info: &vk::SemaphoreWaitInfo,
timeout: u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.wait_semaphores_khr
.ok_or(CallError::MissingCommand("vkWaitSemaphoresKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), wait_info, timeout) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWaitSemaphoresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitSemaphoresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn wait_semaphores_khr(
&self,
wait_info: &vk::SemaphoreWaitInfo,
timeout: u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { wait_semaphores_khr(self, wait_info, timeout) }
}
}
/// Call `vkSignalSemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSignalSemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn signal_semaphore(
device: &Device,
signal_info: &vk::SemaphoreSignalInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.signal_semaphore
.ok_or(CallError::MissingCommand("vkSignalSemaphore"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), signal_info) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkSignalSemaphore` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSignalSemaphore` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn signal_semaphore(
&self,
signal_info: &vk::SemaphoreSignalInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { signal_semaphore(self, signal_info) }
}
}
/// Call `vkSignalSemaphoreKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSignalSemaphoreKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn signal_semaphore_khr(
device: &Device,
signal_info: &vk::SemaphoreSignalInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.signal_semaphore_khr
.ok_or(CallError::MissingCommand("vkSignalSemaphoreKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), signal_info) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkSignalSemaphoreKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSignalSemaphoreKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn signal_semaphore_khr(
&self,
signal_info: &vk::SemaphoreSignalInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { signal_semaphore_khr(self, signal_info) }
}
}
#[cfg(feature = "platform-android")]
/// Call `vkGetAndroidHardwareBufferPropertiesANDROID` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAndroidHardwareBufferPropertiesANDROID` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_android_hardware_buffer_properties_android(
device: &Device,
buffer: *const vk::AHardwareBuffer,
p_properties: *mut vk::AndroidHardwareBufferPropertiesANDROID,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_android_hardware_buffer_properties_android
.ok_or(CallError::MissingCommand(
"vkGetAndroidHardwareBufferPropertiesANDROID",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), buffer, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-android")]
impl Device {
/// Call `vkGetAndroidHardwareBufferPropertiesANDROID` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAndroidHardwareBufferPropertiesANDROID` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_android_hardware_buffer_properties_android(
&self,
buffer: *const vk::AHardwareBuffer,
p_properties: *mut vk::AndroidHardwareBufferPropertiesANDROID,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_android_hardware_buffer_properties_android(self, buffer, p_properties) }
}
}
#[cfg(feature = "platform-android")]
/// Call `vkGetMemoryAndroidHardwareBufferANDROID` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryAndroidHardwareBufferANDROID` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_android_hardware_buffer_android(
device: &Device,
p_info: *const vk::MemoryGetAndroidHardwareBufferInfoANDROID,
p_buffer: *mut *mut vk::AHardwareBuffer,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_android_hardware_buffer_android
.ok_or(CallError::MissingCommand(
"vkGetMemoryAndroidHardwareBufferANDROID",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_buffer) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-android")]
impl Device {
/// Call `vkGetMemoryAndroidHardwareBufferANDROID` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryAndroidHardwareBufferANDROID` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_android_hardware_buffer_android(
&self,
p_info: *const vk::MemoryGetAndroidHardwareBufferInfoANDROID,
p_buffer: *mut *mut vk::AHardwareBuffer,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_android_hardware_buffer_android(self, p_info, p_buffer) }
}
}
/// Call `vkCmdDrawIndirectCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indirect_count(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_count
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectCount"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indirect_count(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indirect_count(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawIndirectCountKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCountKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indirect_count_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_count_khr
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectCountKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectCountKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCountKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indirect_count_khr(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indirect_count_khr(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawIndirectCountAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCountAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indirect_count_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_count_amd
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectCountAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectCountAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCountAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indirect_count_amd(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indirect_count_amd(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawIndexedIndirectCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indexed_indirect_count(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indexed_indirect_count
.ok_or(CallError::MissingCommand("vkCmdDrawIndexedIndirectCount"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirectCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect_count(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indexed_indirect_count(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawIndexedIndirectCountKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCountKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indexed_indirect_count_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_indexed_indirect_count_khr
.ok_or(CallError::MissingCommand(
"vkCmdDrawIndexedIndirectCountKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirectCountKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCountKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect_count_khr(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indexed_indirect_count_khr(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawIndexedIndirectCountAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCountAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indexed_indirect_count_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_indexed_indirect_count_amd
.ok_or(CallError::MissingCommand(
"vkCmdDrawIndexedIndirectCountAMD",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirectCountAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCountAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect_count_amd(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indexed_indirect_count_amd(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdSetCheckpointNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCheckpointNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_checkpoint_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_checkpoint_marker: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_checkpoint_nv
.ok_or(CallError::MissingCommand("vkCmdSetCheckpointNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_checkpoint_marker) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCheckpointNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCheckpointNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_checkpoint_nv(
&self,
command_buffer: vk::CommandBuffer,
p_checkpoint_marker: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_checkpoint_nv(self, command_buffer, p_checkpoint_marker) }
}
}
/// Call `vkGetQueueCheckpointDataNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueueCheckpointDataNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_queue_checkpoint_data_nv(
device: &Device,
queue: vk::Queue,
p_checkpoint_data_count: *mut u32,
p_checkpoint_data: *mut vk::CheckpointDataNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_queue_checkpoint_data_nv
.ok_or(CallError::MissingCommand("vkGetQueueCheckpointDataNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, p_checkpoint_data_count, p_checkpoint_data) };
Ok(())
}
impl Device {
/// Call `vkGetQueueCheckpointDataNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueueCheckpointDataNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_queue_checkpoint_data_nv(
&self,
queue: vk::Queue,
p_checkpoint_data_count: *mut u32,
p_checkpoint_data: *mut vk::CheckpointDataNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_queue_checkpoint_data_nv(self, queue, p_checkpoint_data_count, p_checkpoint_data) }
}
}
/// Call `vkCmdBindTransformFeedbackBuffersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTransformFeedbackBuffersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_transform_feedback_buffers_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_bind_transform_feedback_buffers_ext
.ok_or(CallError::MissingCommand(
"vkCmdBindTransformFeedbackBuffersEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindTransformFeedbackBuffersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTransformFeedbackBuffersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_transform_feedback_buffers_ext(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_transform_feedback_buffers_ext(
self,
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
)
}
}
}
/// Call `vkCmdBeginTransformFeedbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginTransformFeedbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_transform_feedback_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_counter_buffer: u32,
counter_buffer_count: u32,
p_counter_buffers: *const vk::Buffer,
p_counter_buffer_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_transform_feedback_ext
.ok_or(CallError::MissingCommand("vkCmdBeginTransformFeedbackEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_counter_buffer,
counter_buffer_count,
p_counter_buffers,
p_counter_buffer_offsets,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBeginTransformFeedbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginTransformFeedbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_transform_feedback_ext(
&self,
command_buffer: vk::CommandBuffer,
first_counter_buffer: u32,
counter_buffer_count: u32,
p_counter_buffers: *const vk::Buffer,
p_counter_buffer_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_transform_feedback_ext(
self,
command_buffer,
first_counter_buffer,
counter_buffer_count,
p_counter_buffers,
p_counter_buffer_offsets,
)
}
}
}
/// Call `vkCmdEndTransformFeedbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndTransformFeedbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_transform_feedback_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_counter_buffer: u32,
counter_buffer_count: u32,
p_counter_buffers: *const vk::Buffer,
p_counter_buffer_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_transform_feedback_ext
.ok_or(CallError::MissingCommand("vkCmdEndTransformFeedbackEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_counter_buffer,
counter_buffer_count,
p_counter_buffers,
p_counter_buffer_offsets,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdEndTransformFeedbackEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndTransformFeedbackEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_transform_feedback_ext(
&self,
command_buffer: vk::CommandBuffer,
first_counter_buffer: u32,
counter_buffer_count: u32,
p_counter_buffers: *const vk::Buffer,
p_counter_buffer_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_end_transform_feedback_ext(
self,
command_buffer,
first_counter_buffer,
counter_buffer_count,
p_counter_buffers,
p_counter_buffer_offsets,
)
}
}
}
/// Call `vkCmdBeginQueryIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginQueryIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_query_indexed_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
flags: vk::QueryControlFlags,
index: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_query_indexed_ext
.ok_or(CallError::MissingCommand("vkCmdBeginQueryIndexedEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, query_pool, query, flags, index) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginQueryIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginQueryIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_query_indexed_ext(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
flags: vk::QueryControlFlags,
index: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_query_indexed_ext(self, command_buffer, query_pool, query, flags, index) }
}
}
/// Call `vkCmdEndQueryIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndQueryIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_query_indexed_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
index: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_query_indexed_ext
.ok_or(CallError::MissingCommand("vkCmdEndQueryIndexedEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, query_pool, query, index) };
Ok(())
}
impl Device {
/// Call `vkCmdEndQueryIndexedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndQueryIndexedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_query_indexed_ext(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
query: u32,
index: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_query_indexed_ext(self, command_buffer, query_pool, query, index) }
}
}
/// Call `vkCmdDrawIndirectByteCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectByteCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_indirect_byte_count_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
instance_count: u32,
first_instance: u32,
counter_buffer: vk::Buffer,
counter_buffer_offset: vk::DeviceSize,
counter_offset: u32,
vertex_stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_byte_count_ext
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectByteCountEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
instance_count,
first_instance,
counter_buffer,
counter_buffer_offset,
counter_offset,
vertex_stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectByteCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectByteCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_indirect_byte_count_ext(
&self,
command_buffer: vk::CommandBuffer,
instance_count: u32,
first_instance: u32,
counter_buffer: vk::Buffer,
counter_buffer_offset: vk::DeviceSize,
counter_offset: u32,
vertex_stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indirect_byte_count_ext(
self,
command_buffer,
instance_count,
first_instance,
counter_buffer,
counter_buffer_offset,
counter_offset,
vertex_stride,
)
}
}
}
/// Call `vkCmdSetExclusiveScissorNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExclusiveScissorNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_exclusive_scissor_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
first_exclusive_scissor: u32,
exclusive_scissor_count: u32,
p_exclusive_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_exclusive_scissor_nv
.ok_or(CallError::MissingCommand("vkCmdSetExclusiveScissorNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_exclusive_scissor,
exclusive_scissor_count,
p_exclusive_scissors,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetExclusiveScissorNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExclusiveScissorNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_exclusive_scissor_nv(
&self,
command_buffer: vk::CommandBuffer,
first_exclusive_scissor: u32,
exclusive_scissor_count: u32,
p_exclusive_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_exclusive_scissor_nv(
self,
command_buffer,
first_exclusive_scissor,
exclusive_scissor_count,
p_exclusive_scissors,
)
}
}
}
/// Call `vkCmdSetExclusiveScissorEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExclusiveScissorEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_exclusive_scissor_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
first_exclusive_scissor: u32,
exclusive_scissor_count: u32,
p_exclusive_scissor_enables: *const vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_exclusive_scissor_enable_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetExclusiveScissorEnableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_exclusive_scissor,
exclusive_scissor_count,
p_exclusive_scissor_enables,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetExclusiveScissorEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExclusiveScissorEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_exclusive_scissor_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
first_exclusive_scissor: u32,
exclusive_scissor_count: u32,
p_exclusive_scissor_enables: *const vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_exclusive_scissor_enable_nv(
self,
command_buffer,
first_exclusive_scissor,
exclusive_scissor_count,
p_exclusive_scissor_enables,
)
}
}
}
/// Call `vkCmdBindShadingRateImageNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindShadingRateImageNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_shading_rate_image_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
image_view: vk::ImageView,
image_layout: vk::ImageLayout,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_shading_rate_image_nv
.ok_or(CallError::MissingCommand("vkCmdBindShadingRateImageNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, image_view, image_layout) };
Ok(())
}
impl Device {
/// Call `vkCmdBindShadingRateImageNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindShadingRateImageNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_shading_rate_image_nv(
&self,
command_buffer: vk::CommandBuffer,
image_view: vk::ImageView,
image_layout: vk::ImageLayout,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_shading_rate_image_nv(self, command_buffer, image_view, image_layout) }
}
}
/// Call `vkCmdSetViewportShadingRatePaletteNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportShadingRatePaletteNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_shading_rate_palette_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_shading_rate_palettes: *const vk::ShadingRatePaletteNV,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_viewport_shading_rate_palette_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetViewportShadingRatePaletteNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_viewport,
viewport_count,
p_shading_rate_palettes,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportShadingRatePaletteNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportShadingRatePaletteNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_shading_rate_palette_nv(
&self,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_shading_rate_palettes: *const vk::ShadingRatePaletteNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_viewport_shading_rate_palette_nv(
self,
command_buffer,
first_viewport,
viewport_count,
p_shading_rate_palettes,
)
}
}
}
/// Call `vkCmdSetCoarseSampleOrderNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoarseSampleOrderNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coarse_sample_order_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
sample_order_type: vk::CoarseSampleOrderTypeNV,
custom_sample_order_count: u32,
p_custom_sample_orders: *const vk::CoarseSampleOrderCustomNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_coarse_sample_order_nv
.ok_or(CallError::MissingCommand("vkCmdSetCoarseSampleOrderNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
sample_order_type,
custom_sample_order_count,
p_custom_sample_orders,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetCoarseSampleOrderNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoarseSampleOrderNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coarse_sample_order_nv(
&self,
command_buffer: vk::CommandBuffer,
sample_order_type: vk::CoarseSampleOrderTypeNV,
custom_sample_order_count: u32,
p_custom_sample_orders: *const vk::CoarseSampleOrderCustomNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_coarse_sample_order_nv(
self,
command_buffer,
sample_order_type,
custom_sample_order_count,
p_custom_sample_orders,
)
}
}
}
/// Call `vkCmdDrawMeshTasksNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
task_count: u32,
first_task: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_mesh_tasks_nv
.ok_or(CallError::MissingCommand("vkCmdDrawMeshTasksNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, task_count, first_task) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_nv(
&self,
command_buffer: vk::CommandBuffer,
task_count: u32,
first_task: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_mesh_tasks_nv(self, command_buffer, task_count, first_task) }
}
}
/// Call `vkCmdDrawMeshTasksIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_indirect_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_mesh_tasks_indirect_nv
.ok_or(CallError::MissingCommand("vkCmdDrawMeshTasksIndirectNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, draw_count, stride) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect_nv(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_mesh_tasks_indirect_nv(self, command_buffer, buffer, offset, draw_count, stride)
}
}
}
/// Call `vkCmdDrawMeshTasksIndirectCountNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCountNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_mesh_tasks_indirect_count_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_mesh_tasks_indirect_count_nv
.ok_or(CallError::MissingCommand(
"vkCmdDrawMeshTasksIndirectCountNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirectCountNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCountNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect_count_nv(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_mesh_tasks_indirect_count_nv(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCmdDrawMeshTasksEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_mesh_tasks_ext
.ok_or(CallError::MissingCommand("vkCmdDrawMeshTasksEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, group_count_x, group_count_y, group_count_z) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_ext(
&self,
command_buffer: vk::CommandBuffer,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_mesh_tasks_ext(
self,
command_buffer,
group_count_x,
group_count_y,
group_count_z,
)
}
}
}
/// Call `vkCmdDrawMeshTasksIndirectEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_indirect_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_mesh_tasks_indirect_ext
.ok_or(CallError::MissingCommand("vkCmdDrawMeshTasksIndirectEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, draw_count, stride) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirectEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect_ext(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_mesh_tasks_indirect_ext(self, command_buffer, buffer, offset, draw_count, stride)
}
}
}
/// Call `vkCmdDrawMeshTasksIndirectCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_draw_mesh_tasks_indirect_count_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_mesh_tasks_indirect_count_ext
.ok_or(CallError::MissingCommand(
"vkCmdDrawMeshTasksIndirectCountEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirectCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect_count_ext(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
count_buffer: vk::Buffer,
count_buffer_offset: vk::DeviceSize,
max_draw_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_mesh_tasks_indirect_count_ext(
self,
command_buffer,
buffer,
offset,
count_buffer,
count_buffer_offset,
max_draw_count,
stride,
)
}
}
}
/// Call `vkCompileDeferredNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCompileDeferredNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn compile_deferred_nv(
device: &Device,
pipeline: vk::Pipeline,
shader: u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.compile_deferred_nv
.ok_or(CallError::MissingCommand("vkCompileDeferredNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), pipeline, shader) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCompileDeferredNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCompileDeferredNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn compile_deferred_nv(
&self,
pipeline: vk::Pipeline,
shader: u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { compile_deferred_nv(self, pipeline, shader) }
}
}
/// Call `vkCreateAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_acceleration_structure_nv(
device: &Device,
p_create_info: *const vk::AccelerationStructureCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_acceleration_structure_nv
.ok_or(CallError::MissingCommand("vkCreateAccelerationStructureNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_acceleration_structure,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_acceleration_structure_nv(
&self,
p_create_info: *const vk::AccelerationStructureCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_acceleration_structure_nv(self, p_create_info, p_allocator, p_acceleration_structure)
}
}
}
/// Call `vkCmdBindInvocationMaskHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindInvocationMaskHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_invocation_mask_huawei(
device: &Device,
command_buffer: vk::CommandBuffer,
image_view: vk::ImageView,
image_layout: vk::ImageLayout,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_invocation_mask_huawei
.ok_or(CallError::MissingCommand("vkCmdBindInvocationMaskHUAWEI"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, image_view, image_layout) };
Ok(())
}
impl Device {
/// Call `vkCmdBindInvocationMaskHUAWEI` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindInvocationMaskHUAWEI` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_invocation_mask_huawei(
&self,
command_buffer: vk::CommandBuffer,
image_view: vk::ImageView,
image_layout: vk::ImageLayout,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_invocation_mask_huawei(self, command_buffer, image_view, image_layout) }
}
}
/// Call `vkDestroyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_acceleration_structure_khr(
device: &Device,
acceleration_structure: vk::AccelerationStructureKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_acceleration_structure_khr
.ok_or(CallError::MissingCommand(
"vkDestroyAccelerationStructureKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), acceleration_structure, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_acceleration_structure_khr(
&self,
acceleration_structure: vk::AccelerationStructureKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_acceleration_structure_khr(self, acceleration_structure, p_allocator) }
}
}
/// Call `vkDestroyAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_acceleration_structure_nv(
device: &Device,
acceleration_structure: vk::AccelerationStructureNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_acceleration_structure_nv
.ok_or(CallError::MissingCommand(
"vkDestroyAccelerationStructureNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), acceleration_structure, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_acceleration_structure_nv(
&self,
acceleration_structure: vk::AccelerationStructureNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_acceleration_structure_nv(self, acceleration_structure, p_allocator) }
}
}
/// Call `vkGetAccelerationStructureMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_acceleration_structure_memory_requirements_nv(
device: &Device,
p_info: *const vk::AccelerationStructureMemoryRequirementsInfoNV,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_acceleration_structure_memory_requirements_nv
.ok_or(CallError::MissingCommand(
"vkGetAccelerationStructureMemoryRequirementsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetAccelerationStructureMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_acceleration_structure_memory_requirements_nv(
&self,
p_info: *const vk::AccelerationStructureMemoryRequirementsInfoNV,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_acceleration_structure_memory_requirements_nv(self, p_info, p_memory_requirements)
}
}
}
/// Call `vkBindAccelerationStructureMemoryNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindAccelerationStructureMemoryNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn bind_acceleration_structure_memory_nv(
device: &Device,
bind_info_count: u32,
p_bind_infos: *const vk::BindAccelerationStructureMemoryInfoNV,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.bind_acceleration_structure_memory_nv
.ok_or(CallError::MissingCommand(
"vkBindAccelerationStructureMemoryNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, p_bind_infos) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBindAccelerationStructureMemoryNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindAccelerationStructureMemoryNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn bind_acceleration_structure_memory_nv(
&self,
bind_info_count: u32,
p_bind_infos: *const vk::BindAccelerationStructureMemoryInfoNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_acceleration_structure_memory_nv(self, bind_info_count, p_bind_infos) }
}
}
/// Call `vkCmdCopyAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_acceleration_structure_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
dst: vk::AccelerationStructureNV,
src: vk::AccelerationStructureNV,
mode: vk::CopyAccelerationStructureModeKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_copy_acceleration_structure_nv
.ok_or(CallError::MissingCommand(
"vkCmdCopyAccelerationStructureNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, dst, src, mode) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_acceleration_structure_nv(
&self,
command_buffer: vk::CommandBuffer,
dst: vk::AccelerationStructureNV,
src: vk::AccelerationStructureNV,
mode: vk::CopyAccelerationStructureModeKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_acceleration_structure_nv(self, command_buffer, dst, src, mode) }
}
}
/// Call `vkCmdCopyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_acceleration_structure_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyAccelerationStructureInfoKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_copy_acceleration_structure_khr
.ok_or(CallError::MissingCommand(
"vkCmdCopyAccelerationStructureKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_acceleration_structure_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyAccelerationStructureInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_acceleration_structure_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCopyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_acceleration_structure_khr(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyAccelerationStructureInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_acceleration_structure_khr
.ok_or(CallError::MissingCommand("vkCopyAccelerationStructureKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_acceleration_structure_khr(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyAccelerationStructureInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_acceleration_structure_khr(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdCopyAccelerationStructureToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_acceleration_structure_to_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_acceleration_structure_to_memory_khr
.ok_or(CallError::MissingCommand(
"vkCmdCopyAccelerationStructureToMemoryKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyAccelerationStructureToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyAccelerationStructureToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_acceleration_structure_to_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_acceleration_structure_to_memory_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCopyAccelerationStructureToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyAccelerationStructureToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_acceleration_structure_to_memory_khr(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_acceleration_structure_to_memory_khr
.ok_or(CallError::MissingCommand(
"vkCopyAccelerationStructureToMemoryKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyAccelerationStructureToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyAccelerationStructureToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_acceleration_structure_to_memory_khr(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_acceleration_structure_to_memory_khr(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdCopyMemoryToAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_to_acceleration_structure_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_to_acceleration_structure_khr
.ok_or(CallError::MissingCommand(
"vkCmdCopyMemoryToAccelerationStructureKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryToAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_to_acceleration_structure_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_memory_to_acceleration_structure_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCopyMemoryToAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_memory_to_acceleration_structure_khr(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_memory_to_acceleration_structure_khr
.ok_or(CallError::MissingCommand(
"vkCopyMemoryToAccelerationStructureKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMemoryToAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_memory_to_acceleration_structure_khr(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_memory_to_acceleration_structure_khr(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdWriteAccelerationStructuresPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteAccelerationStructuresPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_acceleration_structures_properties_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureKHR,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_acceleration_structures_properties_khr
.ok_or(CallError::MissingCommand(
"vkCmdWriteAccelerationStructuresPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
acceleration_structure_count,
p_acceleration_structures,
query_type,
query_pool,
first_query,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWriteAccelerationStructuresPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteAccelerationStructuresPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_acceleration_structures_properties_khr(
&self,
command_buffer: vk::CommandBuffer,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureKHR,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_write_acceleration_structures_properties_khr(
self,
command_buffer,
acceleration_structure_count,
p_acceleration_structures,
query_type,
query_pool,
first_query,
)
}
}
}
/// Call `vkCmdWriteAccelerationStructuresPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteAccelerationStructuresPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_acceleration_structures_properties_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureNV,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_acceleration_structures_properties_nv
.ok_or(CallError::MissingCommand(
"vkCmdWriteAccelerationStructuresPropertiesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
acceleration_structure_count,
p_acceleration_structures,
query_type,
query_pool,
first_query,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWriteAccelerationStructuresPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteAccelerationStructuresPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_acceleration_structures_properties_nv(
&self,
command_buffer: vk::CommandBuffer,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureNV,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_write_acceleration_structures_properties_nv(
self,
command_buffer,
acceleration_structure_count,
p_acceleration_structures,
query_type,
query_pool,
first_query,
)
}
}
}
/// Call `vkCmdBuildAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_build_acceleration_structure_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::AccelerationStructureInfoNV,
instance_data: vk::Buffer,
instance_offset: vk::DeviceSize,
update: vk::Bool32,
dst: vk::AccelerationStructureNV,
src: vk::AccelerationStructureNV,
scratch: vk::Buffer,
scratch_offset: vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_build_acceleration_structure_nv
.ok_or(CallError::MissingCommand(
"vkCmdBuildAccelerationStructureNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
p_info,
instance_data,
instance_offset,
update,
dst,
src,
scratch,
scratch_offset,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBuildAccelerationStructureNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructureNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_build_acceleration_structure_nv(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::AccelerationStructureInfoNV,
instance_data: vk::Buffer,
instance_offset: vk::DeviceSize,
update: vk::Bool32,
dst: vk::AccelerationStructureNV,
src: vk::AccelerationStructureNV,
scratch: vk::Buffer,
scratch_offset: vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_build_acceleration_structure_nv(
self,
command_buffer,
p_info,
instance_data,
instance_offset,
update,
dst,
src,
scratch,
scratch_offset,
)
}
}
}
/// Call `vkWriteAccelerationStructuresPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteAccelerationStructuresPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn write_acceleration_structures_properties_khr(
device: &Device,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureKHR,
query_type: vk::QueryType,
data_size: usize,
p_data: *mut std::ffi::c_void,
stride: usize,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.write_acceleration_structures_properties_khr
.ok_or(CallError::MissingCommand(
"vkWriteAccelerationStructuresPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
acceleration_structure_count,
p_acceleration_structures,
query_type,
data_size,
p_data,
stride,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWriteAccelerationStructuresPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteAccelerationStructuresPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn write_acceleration_structures_properties_khr(
&self,
acceleration_structure_count: u32,
p_acceleration_structures: *const vk::AccelerationStructureKHR,
query_type: vk::QueryType,
data_size: usize,
p_data: *mut std::ffi::c_void,
stride: usize,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
write_acceleration_structures_properties_khr(
self,
acceleration_structure_count,
p_acceleration_structures,
query_type,
data_size,
p_data,
stride,
)
}
}
}
/// Call `vkCmdTraceRaysKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_trace_rays_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
width: u32,
height: u32,
depth: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_trace_rays_khr
.ok_or(CallError::MissingCommand("vkCmdTraceRaysKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
p_raygen_shader_binding_table,
p_miss_shader_binding_table,
p_hit_shader_binding_table,
p_callable_shader_binding_table,
width,
height,
depth,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdTraceRaysKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_trace_rays_khr(
&self,
command_buffer: vk::CommandBuffer,
p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
width: u32,
height: u32,
depth: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_trace_rays_khr(
self,
command_buffer,
p_raygen_shader_binding_table,
p_miss_shader_binding_table,
p_hit_shader_binding_table,
p_callable_shader_binding_table,
width,
height,
depth,
)
}
}
}
/// Call `vkCmdTraceRaysNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_trace_rays_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_table_buffer: vk::Buffer,
raygen_shader_binding_offset: vk::DeviceSize,
miss_shader_binding_table_buffer: vk::Buffer,
miss_shader_binding_offset: vk::DeviceSize,
miss_shader_binding_stride: vk::DeviceSize,
hit_shader_binding_table_buffer: vk::Buffer,
hit_shader_binding_offset: vk::DeviceSize,
hit_shader_binding_stride: vk::DeviceSize,
callable_shader_binding_table_buffer: vk::Buffer,
callable_shader_binding_offset: vk::DeviceSize,
callable_shader_binding_stride: vk::DeviceSize,
width: u32,
height: u32,
depth: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_trace_rays_nv
.ok_or(CallError::MissingCommand("vkCmdTraceRaysNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
raygen_shader_binding_table_buffer,
raygen_shader_binding_offset,
miss_shader_binding_table_buffer,
miss_shader_binding_offset,
miss_shader_binding_stride,
hit_shader_binding_table_buffer,
hit_shader_binding_offset,
hit_shader_binding_stride,
callable_shader_binding_table_buffer,
callable_shader_binding_offset,
callable_shader_binding_stride,
width,
height,
depth,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdTraceRaysNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_trace_rays_nv(
&self,
command_buffer: vk::CommandBuffer,
raygen_shader_binding_table_buffer: vk::Buffer,
raygen_shader_binding_offset: vk::DeviceSize,
miss_shader_binding_table_buffer: vk::Buffer,
miss_shader_binding_offset: vk::DeviceSize,
miss_shader_binding_stride: vk::DeviceSize,
hit_shader_binding_table_buffer: vk::Buffer,
hit_shader_binding_offset: vk::DeviceSize,
hit_shader_binding_stride: vk::DeviceSize,
callable_shader_binding_table_buffer: vk::Buffer,
callable_shader_binding_offset: vk::DeviceSize,
callable_shader_binding_stride: vk::DeviceSize,
width: u32,
height: u32,
depth: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_trace_rays_nv(
self,
command_buffer,
raygen_shader_binding_table_buffer,
raygen_shader_binding_offset,
miss_shader_binding_table_buffer,
miss_shader_binding_offset,
miss_shader_binding_stride,
hit_shader_binding_table_buffer,
hit_shader_binding_offset,
hit_shader_binding_stride,
callable_shader_binding_table_buffer,
callable_shader_binding_offset,
callable_shader_binding_stride,
width,
height,
depth,
)
}
}
}
/// Call `vkGetRayTracingShaderGroupHandlesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupHandlesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_ray_tracing_shader_group_handles_khr(
device: &Device,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_ray_tracing_shader_group_handles_khr
.ok_or(CallError::MissingCommand(
"vkGetRayTracingShaderGroupHandlesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline,
first_group,
group_count,
data_size,
p_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetRayTracingShaderGroupHandlesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupHandlesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_ray_tracing_shader_group_handles_khr(
&self,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_ray_tracing_shader_group_handles_khr(
self,
pipeline,
first_group,
group_count,
data_size,
p_data,
)
}
}
}
/// Call `vkGetRayTracingShaderGroupHandlesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupHandlesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_ray_tracing_shader_group_handles_nv(
device: &Device,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_ray_tracing_shader_group_handles_nv
.ok_or(CallError::MissingCommand(
"vkGetRayTracingShaderGroupHandlesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline,
first_group,
group_count,
data_size,
p_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetRayTracingShaderGroupHandlesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupHandlesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_ray_tracing_shader_group_handles_nv(
&self,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_ray_tracing_shader_group_handles_nv(
self,
pipeline,
first_group,
group_count,
data_size,
p_data,
)
}
}
}
/// Call `vkGetRayTracingCaptureReplayShaderGroupHandlesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingCaptureReplayShaderGroupHandlesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_ray_tracing_capture_replay_shader_group_handles_khr(
device: &Device,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_ray_tracing_capture_replay_shader_group_handles_khr
.ok_or(CallError::MissingCommand(
"vkGetRayTracingCaptureReplayShaderGroupHandlesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline,
first_group,
group_count,
data_size,
p_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetRayTracingCaptureReplayShaderGroupHandlesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingCaptureReplayShaderGroupHandlesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_ray_tracing_capture_replay_shader_group_handles_khr(
&self,
pipeline: vk::Pipeline,
first_group: u32,
group_count: u32,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_ray_tracing_capture_replay_shader_group_handles_khr(
self,
pipeline,
first_group,
group_count,
data_size,
p_data,
)
}
}
}
/// Call `vkGetAccelerationStructureHandleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureHandleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_acceleration_structure_handle_nv(
device: &Device,
acceleration_structure: vk::AccelerationStructureNV,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_acceleration_structure_handle_nv
.ok_or(CallError::MissingCommand(
"vkGetAccelerationStructureHandleNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), acceleration_structure, data_size, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetAccelerationStructureHandleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureHandleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_acceleration_structure_handle_nv(
&self,
acceleration_structure: vk::AccelerationStructureNV,
data_size: usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_acceleration_structure_handle_nv(self, acceleration_structure, data_size, p_data) }
}
}
/// Call `vkCreateRayTracingPipelinesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRayTracingPipelinesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_ray_tracing_pipelines_nv(
device: &Device,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::RayTracingPipelineCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_ray_tracing_pipelines_nv
.ok_or(CallError::MissingCommand("vkCreateRayTracingPipelinesNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateRayTracingPipelinesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRayTracingPipelinesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_ray_tracing_pipelines_nv(
&self,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::RayTracingPipelineCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_ray_tracing_pipelines_nv(
self,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
}
}
}
/// Call `vkCreateRayTracingPipelinesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRayTracingPipelinesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_ray_tracing_pipelines_khr(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::RayTracingPipelineCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_ray_tracing_pipelines_khr
.ok_or(CallError::MissingCommand("vkCreateRayTracingPipelinesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
deferred_operation,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateRayTracingPipelinesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateRayTracingPipelinesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_ray_tracing_pipelines_khr(
&self,
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::RayTracingPipelineCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_ray_tracing_pipelines_khr(
self,
deferred_operation,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
}
}
}
/// Call `vkGetPhysicalDeviceCooperativeMatrixPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_cooperative_matrix_properties_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixPropertiesNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_cooperative_matrix_properties_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCooperativeMatrixPropertiesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCooperativeMatrixPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_cooperative_matrix_properties_nv(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixPropertiesNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_cooperative_matrix_properties_nv(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkCmdTraceRaysIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_trace_rays_indirect_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
indirect_device_address: vk::DeviceAddress,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_trace_rays_indirect_khr
.ok_or(CallError::MissingCommand("vkCmdTraceRaysIndirectKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
p_raygen_shader_binding_table,
p_miss_shader_binding_table,
p_hit_shader_binding_table,
p_callable_shader_binding_table,
indirect_device_address,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdTraceRaysIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_trace_rays_indirect_khr(
&self,
command_buffer: vk::CommandBuffer,
p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR,
indirect_device_address: vk::DeviceAddress,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_trace_rays_indirect_khr(
self,
command_buffer,
p_raygen_shader_binding_table,
p_miss_shader_binding_table,
p_hit_shader_binding_table,
p_callable_shader_binding_table,
indirect_device_address,
)
}
}
}
/// Call `vkCmdTraceRaysIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_trace_rays_indirect2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
indirect_device_address: vk::DeviceAddress,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_trace_rays_indirect2_khr
.ok_or(CallError::MissingCommand("vkCmdTraceRaysIndirect2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, indirect_device_address) };
Ok(())
}
impl Device {
/// Call `vkCmdTraceRaysIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdTraceRaysIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_trace_rays_indirect2_khr(
&self,
command_buffer: vk::CommandBuffer,
indirect_device_address: vk::DeviceAddress,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_trace_rays_indirect2_khr(self, command_buffer, indirect_device_address) }
}
}
/// Call `vkGetClusterAccelerationStructureBuildSizesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetClusterAccelerationStructureBuildSizesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_cluster_acceleration_structure_build_sizes_nv(
device: &Device,
p_info: *const vk::ClusterAccelerationStructureInputInfoNV,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_cluster_acceleration_structure_build_sizes_nv
.ok_or(CallError::MissingCommand(
"vkGetClusterAccelerationStructureBuildSizesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_size_info) };
Ok(())
}
impl Device {
/// Call `vkGetClusterAccelerationStructureBuildSizesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetClusterAccelerationStructureBuildSizesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_cluster_acceleration_structure_build_sizes_nv(
&self,
p_info: *const vk::ClusterAccelerationStructureInputInfoNV,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_cluster_acceleration_structure_build_sizes_nv(self, p_info, p_size_info) }
}
}
/// Call `vkCmdBuildClusterAccelerationStructureIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildClusterAccelerationStructureIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_build_cluster_acceleration_structure_indirect_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_command_infos: *const vk::ClusterAccelerationStructureCommandsInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_build_cluster_acceleration_structure_indirect_nv
.ok_or(CallError::MissingCommand(
"vkCmdBuildClusterAccelerationStructureIndirectNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_command_infos) };
Ok(())
}
impl Device {
/// Call `vkCmdBuildClusterAccelerationStructureIndirectNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildClusterAccelerationStructureIndirectNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_build_cluster_acceleration_structure_indirect_nv(
&self,
command_buffer: vk::CommandBuffer,
p_command_infos: *const vk::ClusterAccelerationStructureCommandsInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_build_cluster_acceleration_structure_indirect_nv(self, command_buffer, p_command_infos)
}
}
}
/// Call `vkGetDeviceAccelerationStructureCompatibilityKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceAccelerationStructureCompatibilityKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_acceleration_structure_compatibility_khr(
device: &Device,
p_version_info: *const vk::AccelerationStructureVersionInfoKHR,
p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_acceleration_structure_compatibility_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceAccelerationStructureCompatibilityKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_version_info, p_compatibility) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceAccelerationStructureCompatibilityKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceAccelerationStructureCompatibilityKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_acceleration_structure_compatibility_khr(
&self,
p_version_info: *const vk::AccelerationStructureVersionInfoKHR,
p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_device_acceleration_structure_compatibility_khr(self, p_version_info, p_compatibility)
}
}
}
/// Call `vkGetRayTracingShaderGroupStackSizeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupStackSizeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_ray_tracing_shader_group_stack_size_khr(
device: &Device,
pipeline: vk::Pipeline,
group: u32,
group_shader: vk::ShaderGroupShaderKHR,
) -> Result<vk::DeviceSize, CallError> {
let __vk_function = device
.fp()
.get_ray_tracing_shader_group_stack_size_khr
.ok_or(CallError::MissingCommand(
"vkGetRayTracingShaderGroupStackSizeKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), pipeline, group, group_shader) };
Ok(result)
}
impl Device {
/// Call `vkGetRayTracingShaderGroupStackSizeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetRayTracingShaderGroupStackSizeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_ray_tracing_shader_group_stack_size_khr(
&self,
pipeline: vk::Pipeline,
group: u32,
group_shader: vk::ShaderGroupShaderKHR,
) -> Result<vk::DeviceSize, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_ray_tracing_shader_group_stack_size_khr(self, pipeline, group, group_shader) }
}
}
/// Call `vkCmdSetRayTracingPipelineStackSizeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRayTracingPipelineStackSizeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_ray_tracing_pipeline_stack_size_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_stack_size: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_ray_tracing_pipeline_stack_size_khr
.ok_or(CallError::MissingCommand(
"vkCmdSetRayTracingPipelineStackSizeKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_stack_size) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRayTracingPipelineStackSizeKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRayTracingPipelineStackSizeKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_ray_tracing_pipeline_stack_size_khr(
&self,
command_buffer: vk::CommandBuffer,
pipeline_stack_size: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_ray_tracing_pipeline_stack_size_khr(self, command_buffer, pipeline_stack_size)
}
}
}
/// Call `vkGetImageViewHandleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewHandleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_view_handle_nvx(
device: &Device,
p_info: *const vk::ImageViewHandleInfoNVX,
) -> Result<u32, CallError> {
let __vk_function = device
.fp()
.get_image_view_handle_nvx
.ok_or(CallError::MissingCommand("vkGetImageViewHandleNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
Ok(result)
}
impl Device {
/// Call `vkGetImageViewHandleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewHandleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_view_handle_nvx(
&self,
p_info: *const vk::ImageViewHandleInfoNVX,
) -> Result<u32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_view_handle_nvx(self, p_info) }
}
}
/// Call `vkGetImageViewHandle64NVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewHandle64NVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_view_handle64_nvx(
device: &Device,
p_info: *const vk::ImageViewHandleInfoNVX,
) -> Result<u64, CallError> {
let __vk_function = device
.fp()
.get_image_view_handle64_nvx
.ok_or(CallError::MissingCommand("vkGetImageViewHandle64NVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
Ok(result)
}
impl Device {
/// Call `vkGetImageViewHandle64NVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewHandle64NVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_view_handle64_nvx(
&self,
p_info: *const vk::ImageViewHandleInfoNVX,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_view_handle64_nvx(self, p_info) }
}
}
/// Call `vkGetImageViewAddressNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewAddressNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_view_address_nvx(
device: &Device,
image_view: vk::ImageView,
p_properties: *mut vk::ImageViewAddressPropertiesNVX,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_image_view_address_nvx
.ok_or(CallError::MissingCommand("vkGetImageViewAddressNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), image_view, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetImageViewAddressNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewAddressNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_view_address_nvx(
&self,
image_view: vk::ImageView,
p_properties: *mut vk::ImageViewAddressPropertiesNVX,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_view_address_nvx(self, image_view, p_properties) }
}
}
/// Call `vkGetDeviceCombinedImageSamplerIndexNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceCombinedImageSamplerIndexNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_combined_image_sampler_index_nvx(
device: &Device,
image_view_index: u64,
sampler_index: u64,
) -> Result<u64, CallError> {
let __vk_function = device
.fp()
.get_device_combined_image_sampler_index_nvx
.ok_or(CallError::MissingCommand(
"vkGetDeviceCombinedImageSamplerIndexNVX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), image_view_index, sampler_index) };
Ok(result)
}
impl Device {
/// Call `vkGetDeviceCombinedImageSamplerIndexNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceCombinedImageSamplerIndexNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_combined_image_sampler_index_nvx(
&self,
image_view_index: u64,
sampler_index: u64,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_combined_image_sampler_index_nvx(self, image_view_index, sampler_index) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetPhysicalDeviceSurfacePresentModes2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfacePresentModes2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_surface_present_modes2_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_present_mode_count: *mut u32,
p_present_modes: *mut vk::PresentModeKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_surface_present_modes2_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSurfacePresentModes2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_surface_info,
p_present_mode_count,
p_present_modes,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Instance {
/// Call `vkGetPhysicalDeviceSurfacePresentModes2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSurfacePresentModes2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_surface_present_modes2_ext(
&self,
physical_device: vk::PhysicalDevice,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_present_mode_count: *mut u32,
p_present_modes: *mut vk::PresentModeKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_surface_present_modes2_ext(
self,
physical_device,
p_surface_info,
p_present_mode_count,
p_present_modes,
)
}
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkGetDeviceGroupSurfacePresentModes2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupSurfacePresentModes2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_group_surface_present_modes2_ext(
device: &Device,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_group_surface_present_modes2_ext
.ok_or(CallError::MissingCommand(
"vkGetDeviceGroupSurfacePresentModes2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_surface_info, p_modes) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkGetDeviceGroupSurfacePresentModes2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceGroupSurfacePresentModes2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_group_surface_present_modes2_ext(
&self,
p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,
p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_group_surface_present_modes2_ext(self, p_surface_info, p_modes) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkAcquireFullScreenExclusiveModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireFullScreenExclusiveModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_full_screen_exclusive_mode_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.acquire_full_screen_exclusive_mode_ext
.ok_or(CallError::MissingCommand(
"vkAcquireFullScreenExclusiveModeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkAcquireFullScreenExclusiveModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireFullScreenExclusiveModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_full_screen_exclusive_mode_ext(
&self,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_full_screen_exclusive_mode_ext(self, swapchain) }
}
}
#[cfg(feature = "platform-win32")]
/// Call `vkReleaseFullScreenExclusiveModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseFullScreenExclusiveModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_full_screen_exclusive_mode_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.release_full_screen_exclusive_mode_ext
.ok_or(CallError::MissingCommand(
"vkReleaseFullScreenExclusiveModeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-win32")]
impl Device {
/// Call `vkReleaseFullScreenExclusiveModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseFullScreenExclusiveModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_full_screen_exclusive_mode_ext(
&self,
swapchain: vk::SwapchainKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_full_screen_exclusive_mode_ext(self, swapchain) }
}
}
/// Call `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn enumerate_physical_device_queue_family_performance_query_counters_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_counter_count: *mut u32,
p_counters: *mut vk::PerformanceCounterKHR,
p_counter_descriptions: *mut vk::PerformanceCounterDescriptionKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.enumerate_physical_device_queue_family_performance_query_counters_khr
.ok_or(CallError::MissingCommand(
"vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
queue_family_index,
p_counter_count,
p_counters,
p_counter_descriptions,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn enumerate_physical_device_queue_family_performance_query_counters_khr(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_counter_count: *mut u32,
p_counters: *mut vk::PerformanceCounterKHR,
p_counter_descriptions: *mut vk::PerformanceCounterDescriptionKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
enumerate_physical_device_queue_family_performance_query_counters_khr(
self,
physical_device,
queue_family_index,
p_counter_count,
p_counters,
p_counter_descriptions,
)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_queue_family_performance_query_passes_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_performance_query_create_info: *const vk::QueryPoolPerformanceCreateInfoKHR,
p_num_passes: *mut u32,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_performance_query_passes_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
p_performance_query_create_info,
p_num_passes,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_performance_query_passes_khr(
&self,
physical_device: vk::PhysicalDevice,
p_performance_query_create_info: *const vk::QueryPoolPerformanceCreateInfoKHR,
p_num_passes: *mut u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_performance_query_passes_khr(
self,
physical_device,
p_performance_query_create_info,
p_num_passes,
)
}
}
}
/// Call `vkAcquireProfilingLockKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireProfilingLockKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_profiling_lock_khr(
device: &Device,
p_info: *const vk::AcquireProfilingLockInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.acquire_profiling_lock_khr
.ok_or(CallError::MissingCommand("vkAcquireProfilingLockKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkAcquireProfilingLockKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireProfilingLockKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_profiling_lock_khr(
&self,
p_info: *const vk::AcquireProfilingLockInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_profiling_lock_khr(self, p_info) }
}
}
/// Call `vkReleaseProfilingLockKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseProfilingLockKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_profiling_lock_khr(device: &Device) -> Result<(), CallError> {
let __vk_function = device
.fp()
.release_profiling_lock_khr
.ok_or(CallError::MissingCommand("vkReleaseProfilingLockKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle()) };
Ok(())
}
impl Device {
/// Call `vkReleaseProfilingLockKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseProfilingLockKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_profiling_lock_khr(&self) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_profiling_lock_khr(self) }
}
}
/// Call `vkGetImageDrmFormatModifierPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageDrmFormatModifierPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_drm_format_modifier_properties_ext(
device: &Device,
image: vk::Image,
p_properties: *mut vk::ImageDrmFormatModifierPropertiesEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_image_drm_format_modifier_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetImageDrmFormatModifierPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), image, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetImageDrmFormatModifierPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageDrmFormatModifierPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_drm_format_modifier_properties_ext(
&self,
image: vk::Image,
p_properties: *mut vk::ImageDrmFormatModifierPropertiesEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_drm_format_modifier_properties_ext(self, image, p_properties) }
}
}
/// Call `vkGetBufferOpaqueCaptureAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_buffer_opaque_capture_address(
device: &Device,
info: &vk::BufferDeviceAddressInfo,
) -> Result<u64, CallError> {
let __vk_function = device
.fp()
.get_buffer_opaque_capture_address
.ok_or(CallError::MissingCommand("vkGetBufferOpaqueCaptureAddress"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetBufferOpaqueCaptureAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_buffer_opaque_capture_address(
&self,
info: &vk::BufferDeviceAddressInfo,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_opaque_capture_address(self, info) }
}
}
/// Call `vkGetBufferOpaqueCaptureAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_buffer_opaque_capture_address_khr(
device: &Device,
info: &vk::BufferDeviceAddressInfo,
) -> Result<u64, CallError> {
let __vk_function =
device
.fp()
.get_buffer_opaque_capture_address_khr
.ok_or(CallError::MissingCommand(
"vkGetBufferOpaqueCaptureAddressKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetBufferOpaqueCaptureAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_buffer_opaque_capture_address_khr(
&self,
info: &vk::BufferDeviceAddressInfo,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_opaque_capture_address_khr(self, info) }
}
}
/// Call `vkGetBufferDeviceAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_buffer_device_address(
device: &Device,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
let __vk_function = device
.fp()
.get_buffer_device_address
.ok_or(CallError::MissingCommand("vkGetBufferDeviceAddress"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetBufferDeviceAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_buffer_device_address(
&self,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_device_address(self, info) }
}
}
/// Call `vkGetBufferDeviceAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_buffer_device_address_khr(
device: &Device,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
let __vk_function = device
.fp()
.get_buffer_device_address_khr
.ok_or(CallError::MissingCommand("vkGetBufferDeviceAddressKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetBufferDeviceAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_buffer_device_address_khr(
&self,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_device_address_khr(self, info) }
}
}
/// Call `vkGetBufferDeviceAddressEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddressEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_buffer_device_address_ext(
device: &Device,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
let __vk_function = device
.fp()
.get_buffer_device_address_ext
.ok_or(CallError::MissingCommand("vkGetBufferDeviceAddressEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetBufferDeviceAddressEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferDeviceAddressEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_buffer_device_address_ext(
&self,
info: &vk::BufferDeviceAddressInfo,
) -> Result<vk::DeviceAddress, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_device_address_ext(self, info) }
}
}
/// Call `vkCreateHeadlessSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateHeadlessSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_headless_surface_ext(
instance: &Instance,
p_create_info: *const vk::HeadlessSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.create_headless_surface_ext
.ok_or(CallError::MissingCommand("vkCreateHeadlessSurfaceEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(instance.handle(), p_create_info, p_allocator, p_surface) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkCreateHeadlessSurfaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateHeadlessSurfaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_headless_surface_ext(
&self,
p_create_info: *const vk::HeadlessSurfaceCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_surface: *mut vk::SurfaceKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_headless_surface_ext(self, p_create_info, p_allocator, p_surface) }
}
}
/// Call `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_supported_framebuffer_mixed_samples_combinations_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_combination_count: *mut u32,
p_combinations: *mut vk::FramebufferMixedSamplesCombinationNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_supported_framebuffer_mixed_samples_combinations_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_combination_count, p_combinations) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_supported_framebuffer_mixed_samples_combinations_nv(
&self,
physical_device: vk::PhysicalDevice,
p_combination_count: *mut u32,
p_combinations: *mut vk::FramebufferMixedSamplesCombinationNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_supported_framebuffer_mixed_samples_combinations_nv(
self,
physical_device,
p_combination_count,
p_combinations,
)
}
}
}
/// Call `vkInitializePerformanceApiINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkInitializePerformanceApiINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn initialize_performance_api_intel(
device: &Device,
p_initialize_info: *const vk::InitializePerformanceApiInfoINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.initialize_performance_api_intel
.ok_or(CallError::MissingCommand("vkInitializePerformanceApiINTEL"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_initialize_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkInitializePerformanceApiINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkInitializePerformanceApiINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn initialize_performance_api_intel(
&self,
p_initialize_info: *const vk::InitializePerformanceApiInfoINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { initialize_performance_api_intel(self, p_initialize_info) }
}
}
/// Call `vkUninitializePerformanceApiINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUninitializePerformanceApiINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn uninitialize_performance_api_intel(device: &Device) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.uninitialize_performance_api_intel
.ok_or(CallError::MissingCommand(
"vkUninitializePerformanceApiINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle()) };
Ok(())
}
impl Device {
/// Call `vkUninitializePerformanceApiINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUninitializePerformanceApiINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn uninitialize_performance_api_intel(&self) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { uninitialize_performance_api_intel(self) }
}
}
/// Call `vkCmdSetPerformanceMarkerINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceMarkerINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_performance_marker_intel(
device: &Device,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::PerformanceMarkerInfoINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.cmd_set_performance_marker_intel
.ok_or(CallError::MissingCommand("vkCmdSetPerformanceMarkerINTEL"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, p_marker_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdSetPerformanceMarkerINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceMarkerINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_performance_marker_intel(
&self,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::PerformanceMarkerInfoINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_performance_marker_intel(self, command_buffer, p_marker_info) }
}
}
/// Call `vkCmdSetPerformanceStreamMarkerINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceStreamMarkerINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_performance_stream_marker_intel(
device: &Device,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::PerformanceStreamMarkerInfoINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.cmd_set_performance_stream_marker_intel
.ok_or(CallError::MissingCommand(
"vkCmdSetPerformanceStreamMarkerINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, p_marker_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdSetPerformanceStreamMarkerINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceStreamMarkerINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_performance_stream_marker_intel(
&self,
command_buffer: vk::CommandBuffer,
p_marker_info: *const vk::PerformanceStreamMarkerInfoINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_performance_stream_marker_intel(self, command_buffer, p_marker_info) }
}
}
/// Call `vkCmdSetPerformanceOverrideINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceOverrideINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_performance_override_intel(
device: &Device,
command_buffer: vk::CommandBuffer,
p_override_info: *const vk::PerformanceOverrideInfoINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.cmd_set_performance_override_intel
.ok_or(CallError::MissingCommand(
"vkCmdSetPerformanceOverrideINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, p_override_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdSetPerformanceOverrideINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPerformanceOverrideINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_performance_override_intel(
&self,
command_buffer: vk::CommandBuffer,
p_override_info: *const vk::PerformanceOverrideInfoINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_performance_override_intel(self, command_buffer, p_override_info) }
}
}
/// Call `vkAcquirePerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquirePerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_performance_configuration_intel(
device: &Device,
p_acquire_info: *const vk::PerformanceConfigurationAcquireInfoINTEL,
p_configuration: *mut vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.acquire_performance_configuration_intel
.ok_or(CallError::MissingCommand(
"vkAcquirePerformanceConfigurationINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_acquire_info, p_configuration) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkAcquirePerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquirePerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_performance_configuration_intel(
&self,
p_acquire_info: *const vk::PerformanceConfigurationAcquireInfoINTEL,
p_configuration: *mut vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_performance_configuration_intel(self, p_acquire_info, p_configuration) }
}
}
/// Call `vkReleasePerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleasePerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_performance_configuration_intel(
device: &Device,
configuration: vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.release_performance_configuration_intel
.ok_or(CallError::MissingCommand(
"vkReleasePerformanceConfigurationINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), configuration) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkReleasePerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleasePerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_performance_configuration_intel(
&self,
configuration: vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_performance_configuration_intel(self, configuration) }
}
}
/// Call `vkQueueSetPerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSetPerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_set_performance_configuration_intel(
device: &Device,
queue: vk::Queue,
configuration: vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.queue_set_performance_configuration_intel
.ok_or(CallError::MissingCommand(
"vkQueueSetPerformanceConfigurationINTEL",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, configuration) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkQueueSetPerformanceConfigurationINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSetPerformanceConfigurationINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_set_performance_configuration_intel(
&self,
queue: vk::Queue,
configuration: vk::PerformanceConfigurationINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_set_performance_configuration_intel(self, queue, configuration) }
}
}
/// Call `vkGetPerformanceParameterINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPerformanceParameterINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_performance_parameter_intel(
device: &Device,
parameter: vk::PerformanceParameterTypeINTEL,
p_value: *mut vk::PerformanceValueINTEL,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_performance_parameter_intel
.ok_or(CallError::MissingCommand("vkGetPerformanceParameterINTEL"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), parameter, p_value) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPerformanceParameterINTEL` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPerformanceParameterINTEL` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_performance_parameter_intel(
&self,
parameter: vk::PerformanceParameterTypeINTEL,
p_value: *mut vk::PerformanceValueINTEL,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_performance_parameter_intel(self, parameter, p_value) }
}
}
/// Call `vkGetDeviceMemoryOpaqueCaptureAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryOpaqueCaptureAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_device_memory_opaque_capture_address(
device: &Device,
info: &vk::DeviceMemoryOpaqueCaptureAddressInfo,
) -> Result<u64, CallError> {
let __vk_function =
device
.fp()
.get_device_memory_opaque_capture_address
.ok_or(CallError::MissingCommand(
"vkGetDeviceMemoryOpaqueCaptureAddress",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetDeviceMemoryOpaqueCaptureAddress` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryOpaqueCaptureAddress` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_device_memory_opaque_capture_address(
&self,
info: &vk::DeviceMemoryOpaqueCaptureAddressInfo,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_memory_opaque_capture_address(self, info) }
}
}
/// Call `vkGetDeviceMemoryOpaqueCaptureAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryOpaqueCaptureAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
pub unsafe fn get_device_memory_opaque_capture_address_khr(
device: &Device,
info: &vk::DeviceMemoryOpaqueCaptureAddressInfo,
) -> Result<u64, CallError> {
let __vk_function = device
.fp()
.get_device_memory_opaque_capture_address_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceMemoryOpaqueCaptureAddressKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), info) };
Ok(result)
}
impl Device {
/// Call `vkGetDeviceMemoryOpaqueCaptureAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command; the native scalar is never converted to a status.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMemoryOpaqueCaptureAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Returns the native 64-bit value unchanged, including zero. This is not a
/// VkResult status; opaque capture values are tokens, not dereferenceable addresses.
/// This call neither owns memory nor establishes its lifetime or device accessibility.
#[inline]
pub unsafe fn get_device_memory_opaque_capture_address_khr(
&self,
info: &vk::DeviceMemoryOpaqueCaptureAddressInfo,
) -> Result<u64, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_memory_opaque_capture_address_khr(self, info) }
}
}
/// Call `vkGetPipelineExecutablePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutablePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_executable_properties_khr(
device: &Device,
p_pipeline_info: *const vk::PipelineInfoKHR,
p_executable_count: *mut u32,
p_properties: *mut vk::PipelineExecutablePropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_pipeline_executable_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPipelineExecutablePropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_pipeline_info,
p_executable_count,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelineExecutablePropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutablePropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_executable_properties_khr(
&self,
p_pipeline_info: *const vk::PipelineInfoKHR,
p_executable_count: *mut u32,
p_properties: *mut vk::PipelineExecutablePropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_pipeline_executable_properties_khr(
self,
p_pipeline_info,
p_executable_count,
p_properties,
)
}
}
}
/// Call `vkGetPipelineExecutableStatisticsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutableStatisticsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_executable_statistics_khr(
device: &Device,
p_executable_info: *const vk::PipelineExecutableInfoKHR,
p_statistic_count: *mut u32,
p_statistics: *mut vk::PipelineExecutableStatisticKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_pipeline_executable_statistics_khr
.ok_or(CallError::MissingCommand(
"vkGetPipelineExecutableStatisticsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_executable_info,
p_statistic_count,
p_statistics,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelineExecutableStatisticsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutableStatisticsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_executable_statistics_khr(
&self,
p_executable_info: *const vk::PipelineExecutableInfoKHR,
p_statistic_count: *mut u32,
p_statistics: *mut vk::PipelineExecutableStatisticKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_pipeline_executable_statistics_khr(
self,
p_executable_info,
p_statistic_count,
p_statistics,
)
}
}
}
/// Call `vkGetPipelineExecutableInternalRepresentationsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutableInternalRepresentationsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_executable_internal_representations_khr(
device: &Device,
p_executable_info: *const vk::PipelineExecutableInfoKHR,
p_internal_representation_count: *mut u32,
p_internal_representations: *mut vk::PipelineExecutableInternalRepresentationKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_pipeline_executable_internal_representations_khr
.ok_or(CallError::MissingCommand(
"vkGetPipelineExecutableInternalRepresentationsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_executable_info,
p_internal_representation_count,
p_internal_representations,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelineExecutableInternalRepresentationsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineExecutableInternalRepresentationsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_executable_internal_representations_khr(
&self,
p_executable_info: *const vk::PipelineExecutableInfoKHR,
p_internal_representation_count: *mut u32,
p_internal_representations: *mut vk::PipelineExecutableInternalRepresentationKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_pipeline_executable_internal_representations_khr(
self,
p_executable_info,
p_internal_representation_count,
p_internal_representations,
)
}
}
}
/// Call `vkCmdSetLineStipple` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStipple` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_line_stipple(
device: &Device,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_line_stipple
.ok_or(CallError::MissingCommand("vkCmdSetLineStipple"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, line_stipple_factor, line_stipple_pattern) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineStipple` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStipple` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_line_stipple(
&self,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_line_stipple(
self,
command_buffer,
line_stipple_factor,
line_stipple_pattern,
)
}
}
}
/// Call `vkCmdSetLineStippleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_line_stipple_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_line_stipple_khr
.ok_or(CallError::MissingCommand("vkCmdSetLineStippleKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, line_stipple_factor, line_stipple_pattern) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineStippleKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_line_stipple_khr(
&self,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_line_stipple_khr(
self,
command_buffer,
line_stipple_factor,
line_stipple_pattern,
)
}
}
}
/// Call `vkCmdSetLineStippleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_line_stipple_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_line_stipple_ext
.ok_or(CallError::MissingCommand("vkCmdSetLineStippleEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, line_stipple_factor, line_stipple_pattern) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineStippleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_line_stipple_ext(
&self,
command_buffer: vk::CommandBuffer,
line_stipple_factor: u32,
line_stipple_pattern: u16,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_line_stipple_ext(
self,
command_buffer,
line_stipple_factor,
line_stipple_pattern,
)
}
}
}
/// Call `vkGetPhysicalDeviceToolProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceToolProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_tool_properties(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_tool_count: *mut u32,
p_tool_properties: *mut vk::PhysicalDeviceToolProperties,
) -> Result<vk::Result, CallError> {
let __vk_function =
instance
.fp()
.get_physical_device_tool_properties
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceToolProperties",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_tool_count, p_tool_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceToolProperties` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceToolProperties` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_tool_properties(
&self,
physical_device: vk::PhysicalDevice,
p_tool_count: *mut u32,
p_tool_properties: *mut vk::PhysicalDeviceToolProperties,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_tool_properties(self, physical_device, p_tool_count, p_tool_properties)
}
}
}
/// Call `vkGetPhysicalDeviceToolPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceToolPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_tool_properties_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_tool_count: *mut u32,
p_tool_properties: *mut vk::PhysicalDeviceToolProperties,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_tool_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceToolPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_tool_count, p_tool_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceToolPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceToolPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_tool_properties_ext(
&self,
physical_device: vk::PhysicalDevice,
p_tool_count: *mut u32,
p_tool_properties: *mut vk::PhysicalDeviceToolProperties,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_tool_properties_ext(
self,
physical_device,
p_tool_count,
p_tool_properties,
)
}
}
}
/// Call `vkCreateAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_acceleration_structure_khr(
device: &Device,
p_create_info: *const vk::AccelerationStructureCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_acceleration_structure_khr
.ok_or(CallError::MissingCommand(
"vkCreateAccelerationStructureKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_acceleration_structure,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateAccelerationStructureKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructureKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_acceleration_structure_khr(
&self,
p_create_info: *const vk::AccelerationStructureCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_acceleration_structure_khr(self, p_create_info, p_allocator, p_acceleration_structure)
}
}
}
/// Call `vkCmdBuildAccelerationStructuresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructuresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_build_acceleration_structures_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
pp_build_range_infos: *const *const vk::AccelerationStructureBuildRangeInfoKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_build_acceleration_structures_khr
.ok_or(CallError::MissingCommand(
"vkCmdBuildAccelerationStructuresKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, info_count, p_infos, pp_build_range_infos) };
Ok(())
}
impl Device {
/// Call `vkCmdBuildAccelerationStructuresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructuresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_build_acceleration_structures_khr(
&self,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
pp_build_range_infos: *const *const vk::AccelerationStructureBuildRangeInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_build_acceleration_structures_khr(
self,
command_buffer,
info_count,
p_infos,
pp_build_range_infos,
)
}
}
}
/// Call `vkCmdBuildAccelerationStructuresIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructuresIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_build_acceleration_structures_indirect_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
p_indirect_device_addresses: *const vk::DeviceAddress,
p_indirect_strides: *const u32,
pp_max_primitive_counts: *const *const u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_build_acceleration_structures_indirect_khr
.ok_or(CallError::MissingCommand(
"vkCmdBuildAccelerationStructuresIndirectKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
info_count,
p_infos,
p_indirect_device_addresses,
p_indirect_strides,
pp_max_primitive_counts,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBuildAccelerationStructuresIndirectKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildAccelerationStructuresIndirectKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_build_acceleration_structures_indirect_khr(
&self,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
p_indirect_device_addresses: *const vk::DeviceAddress,
p_indirect_strides: *const u32,
pp_max_primitive_counts: *const *const u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_build_acceleration_structures_indirect_khr(
self,
command_buffer,
info_count,
p_infos,
p_indirect_device_addresses,
p_indirect_strides,
pp_max_primitive_counts,
)
}
}
}
/// Call `vkBuildAccelerationStructuresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBuildAccelerationStructuresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn build_acceleration_structures_khr(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
pp_build_range_infos: *const *const vk::AccelerationStructureBuildRangeInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.build_acceleration_structures_khr
.ok_or(CallError::MissingCommand(
"vkBuildAccelerationStructuresKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
deferred_operation,
info_count,
p_infos,
pp_build_range_infos,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBuildAccelerationStructuresKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBuildAccelerationStructuresKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn build_acceleration_structures_khr(
&self,
deferred_operation: vk::DeferredOperationKHR,
info_count: u32,
p_infos: *const vk::AccelerationStructureBuildGeometryInfoKHR,
pp_build_range_infos: *const *const vk::AccelerationStructureBuildRangeInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
build_acceleration_structures_khr(
self,
deferred_operation,
info_count,
p_infos,
pp_build_range_infos,
)
}
}
}
/// Call `vkGetAccelerationStructureDeviceAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureDeviceAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_acceleration_structure_device_address_khr(
device: &Device,
p_info: *const vk::AccelerationStructureDeviceAddressInfoKHR,
) -> Result<vk::DeviceAddress, CallError> {
let __vk_function = device
.fp()
.get_acceleration_structure_device_address_khr
.ok_or(CallError::MissingCommand(
"vkGetAccelerationStructureDeviceAddressKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
Ok(result)
}
impl Device {
/// Call `vkGetAccelerationStructureDeviceAddressKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureDeviceAddressKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_acceleration_structure_device_address_khr(
&self,
p_info: *const vk::AccelerationStructureDeviceAddressInfoKHR,
) -> Result<vk::DeviceAddress, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_acceleration_structure_device_address_khr(self, p_info) }
}
}
/// Call `vkCreateDeferredOperationKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDeferredOperationKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_deferred_operation_khr(
device: &Device,
p_allocator: *const vk::AllocationCallbacks,
p_deferred_operation: *mut vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_deferred_operation_khr
.ok_or(CallError::MissingCommand("vkCreateDeferredOperationKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_allocator, p_deferred_operation) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateDeferredOperationKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDeferredOperationKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_deferred_operation_khr(
&self,
p_allocator: *const vk::AllocationCallbacks,
p_deferred_operation: *mut vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_deferred_operation_khr(self, p_allocator, p_deferred_operation) }
}
}
/// Call `vkDestroyDeferredOperationKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDeferredOperationKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_deferred_operation_khr(
device: &Device,
operation: vk::DeferredOperationKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_deferred_operation_khr
.ok_or(CallError::MissingCommand("vkDestroyDeferredOperationKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), operation, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyDeferredOperationKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDeferredOperationKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_deferred_operation_khr(
&self,
operation: vk::DeferredOperationKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_deferred_operation_khr(self, operation, p_allocator) }
}
}
/// Call `vkGetDeferredOperationMaxConcurrencyKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeferredOperationMaxConcurrencyKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_deferred_operation_max_concurrency_khr(
device: &Device,
operation: vk::DeferredOperationKHR,
) -> Result<u32, CallError> {
let __vk_function = device
.fp()
.get_deferred_operation_max_concurrency_khr
.ok_or(CallError::MissingCommand(
"vkGetDeferredOperationMaxConcurrencyKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), operation) };
Ok(result)
}
impl Device {
/// Call `vkGetDeferredOperationMaxConcurrencyKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeferredOperationMaxConcurrencyKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_deferred_operation_max_concurrency_khr(
&self,
operation: vk::DeferredOperationKHR,
) -> Result<u32, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_deferred_operation_max_concurrency_khr(self, operation) }
}
}
/// Call `vkGetDeferredOperationResultKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeferredOperationResultKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_deferred_operation_result_khr(
device: &Device,
operation: vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_deferred_operation_result_khr
.ok_or(CallError::MissingCommand("vkGetDeferredOperationResultKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), operation) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeferredOperationResultKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeferredOperationResultKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_deferred_operation_result_khr(
&self,
operation: vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_deferred_operation_result_khr(self, operation) }
}
}
/// Call `vkDeferredOperationJoinKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDeferredOperationJoinKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn deferred_operation_join_khr(
device: &Device,
operation: vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.deferred_operation_join_khr
.ok_or(CallError::MissingCommand("vkDeferredOperationJoinKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), operation) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkDeferredOperationJoinKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDeferredOperationJoinKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn deferred_operation_join_khr(
&self,
operation: vk::DeferredOperationKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { deferred_operation_join_khr(self, operation) }
}
}
/// Call `vkGetPipelineIndirectMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineIndirectMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_indirect_memory_requirements_nv(
device: &Device,
p_create_info: *const vk::ComputePipelineCreateInfo,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_pipeline_indirect_memory_requirements_nv
.ok_or(CallError::MissingCommand(
"vkGetPipelineIndirectMemoryRequirementsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_create_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetPipelineIndirectMemoryRequirementsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineIndirectMemoryRequirementsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_indirect_memory_requirements_nv(
&self,
p_create_info: *const vk::ComputePipelineCreateInfo,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_pipeline_indirect_memory_requirements_nv(self, p_create_info, p_memory_requirements)
}
}
}
/// Call `vkGetPipelineIndirectDeviceAddressNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineIndirectDeviceAddressNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_indirect_device_address_nv(
device: &Device,
p_info: *const vk::PipelineIndirectDeviceAddressInfoNV,
) -> Result<vk::DeviceAddress, CallError> {
let __vk_function =
device
.fp()
.get_pipeline_indirect_device_address_nv
.ok_or(CallError::MissingCommand(
"vkGetPipelineIndirectDeviceAddressNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
Ok(result)
}
impl Device {
/// Call `vkGetPipelineIndirectDeviceAddressNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelineIndirectDeviceAddressNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_indirect_device_address_nv(
&self,
p_info: *const vk::PipelineIndirectDeviceAddressInfoNV,
) -> Result<vk::DeviceAddress, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_pipeline_indirect_device_address_nv(self, p_info) }
}
}
/// Call `vkAntiLagUpdateAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAntiLagUpdateAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn anti_lag_update_amd(
device: &Device,
p_data: *const vk::AntiLagDataAMD,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.anti_lag_update_amd
.ok_or(CallError::MissingCommand("vkAntiLagUpdateAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_data) };
Ok(())
}
impl Device {
/// Call `vkAntiLagUpdateAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAntiLagUpdateAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn anti_lag_update_amd(
&self,
p_data: *const vk::AntiLagDataAMD,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { anti_lag_update_amd(self, p_data) }
}
}
/// Call `vkCmdSetCullMode` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCullMode` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_cull_mode(
device: &Device,
command_buffer: vk::CommandBuffer,
cull_mode: vk::CullModeFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_cull_mode
.ok_or(CallError::MissingCommand("vkCmdSetCullMode"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, cull_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCullMode` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCullMode` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_cull_mode(
&self,
command_buffer: vk::CommandBuffer,
cull_mode: vk::CullModeFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_cull_mode(self, command_buffer, cull_mode) }
}
}
/// Call `vkCmdSetCullModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCullModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_cull_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
cull_mode: vk::CullModeFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_cull_mode_ext
.ok_or(CallError::MissingCommand("vkCmdSetCullModeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, cull_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCullModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCullModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_cull_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
cull_mode: vk::CullModeFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_cull_mode_ext(self, command_buffer, cull_mode) }
}
}
/// Call `vkCmdSetFrontFace` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFrontFace` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_front_face(
device: &Device,
command_buffer: vk::CommandBuffer,
front_face: vk::FrontFace,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_front_face
.ok_or(CallError::MissingCommand("vkCmdSetFrontFace"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, front_face) };
Ok(())
}
impl Device {
/// Call `vkCmdSetFrontFace` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFrontFace` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_front_face(
&self,
command_buffer: vk::CommandBuffer,
front_face: vk::FrontFace,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_front_face(self, command_buffer, front_face) }
}
}
/// Call `vkCmdSetFrontFaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFrontFaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_front_face_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
front_face: vk::FrontFace,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_front_face_ext
.ok_or(CallError::MissingCommand("vkCmdSetFrontFaceEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, front_face) };
Ok(())
}
impl Device {
/// Call `vkCmdSetFrontFaceEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFrontFaceEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_front_face_ext(
&self,
command_buffer: vk::CommandBuffer,
front_face: vk::FrontFace,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_front_face_ext(self, command_buffer, front_face) }
}
}
/// Call `vkCmdSetPrimitiveTopology` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveTopology` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_primitive_topology(
device: &Device,
command_buffer: vk::CommandBuffer,
primitive_topology: vk::PrimitiveTopology,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_primitive_topology
.ok_or(CallError::MissingCommand("vkCmdSetPrimitiveTopology"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, primitive_topology) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPrimitiveTopology` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveTopology` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_primitive_topology(
&self,
command_buffer: vk::CommandBuffer,
primitive_topology: vk::PrimitiveTopology,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_primitive_topology(self, command_buffer, primitive_topology) }
}
}
/// Call `vkCmdSetPrimitiveTopologyEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveTopologyEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_primitive_topology_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
primitive_topology: vk::PrimitiveTopology,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_primitive_topology_ext
.ok_or(CallError::MissingCommand("vkCmdSetPrimitiveTopologyEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, primitive_topology) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPrimitiveTopologyEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveTopologyEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_primitive_topology_ext(
&self,
command_buffer: vk::CommandBuffer,
primitive_topology: vk::PrimitiveTopology,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_primitive_topology_ext(self, command_buffer, primitive_topology) }
}
}
/// Call `vkCmdSetViewportWithCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWithCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_with_count(
device: &Device,
command_buffer: vk::CommandBuffer,
viewport_count: u32,
p_viewports: *const vk::Viewport,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_viewport_with_count
.ok_or(CallError::MissingCommand("vkCmdSetViewportWithCount"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, viewport_count, p_viewports) };
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportWithCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWithCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_with_count(
&self,
command_buffer: vk::CommandBuffer,
viewport_count: u32,
p_viewports: *const vk::Viewport,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_viewport_with_count(self, command_buffer, viewport_count, p_viewports) }
}
}
/// Call `vkCmdSetViewportWithCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWithCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_with_count_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
viewport_count: u32,
p_viewports: *const vk::Viewport,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_viewport_with_count_ext
.ok_or(CallError::MissingCommand("vkCmdSetViewportWithCountEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, viewport_count, p_viewports) };
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportWithCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWithCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_with_count_ext(
&self,
command_buffer: vk::CommandBuffer,
viewport_count: u32,
p_viewports: *const vk::Viewport,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_viewport_with_count_ext(self, command_buffer, viewport_count, p_viewports) }
}
}
/// Call `vkCmdSetScissorWithCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissorWithCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_scissor_with_count(
device: &Device,
command_buffer: vk::CommandBuffer,
scissor_count: u32,
p_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_scissor_with_count
.ok_or(CallError::MissingCommand("vkCmdSetScissorWithCount"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, scissor_count, p_scissors) };
Ok(())
}
impl Device {
/// Call `vkCmdSetScissorWithCount` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissorWithCount` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_scissor_with_count(
&self,
command_buffer: vk::CommandBuffer,
scissor_count: u32,
p_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_scissor_with_count(self, command_buffer, scissor_count, p_scissors) }
}
}
/// Call `vkCmdSetScissorWithCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissorWithCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_scissor_with_count_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
scissor_count: u32,
p_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_scissor_with_count_ext
.ok_or(CallError::MissingCommand("vkCmdSetScissorWithCountEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, scissor_count, p_scissors) };
Ok(())
}
impl Device {
/// Call `vkCmdSetScissorWithCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetScissorWithCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_scissor_with_count_ext(
&self,
command_buffer: vk::CommandBuffer,
scissor_count: u32,
p_scissors: *const vk::Rect2D,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_scissor_with_count_ext(self, command_buffer, scissor_count, p_scissors) }
}
}
/// Call `vkCmdBindIndexBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_index_buffer2(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
size: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_index_buffer2
.ok_or(CallError::MissingCommand("vkCmdBindIndexBuffer2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, size, index_type) };
Ok(())
}
impl Device {
/// Call `vkCmdBindIndexBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_index_buffer2(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
size: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_index_buffer2(self, command_buffer, buffer, offset, size, index_type) }
}
}
/// Call `vkCmdBindIndexBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_index_buffer2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
size: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_index_buffer2_khr
.ok_or(CallError::MissingCommand("vkCmdBindIndexBuffer2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer, offset, size, index_type) };
Ok(())
}
impl Device {
/// Call `vkCmdBindIndexBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_index_buffer2_khr(
&self,
command_buffer: vk::CommandBuffer,
buffer: vk::Buffer,
offset: vk::DeviceSize,
size: vk::DeviceSize,
index_type: vk::IndexType,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_index_buffer2_khr(self, command_buffer, buffer, offset, size, index_type) }
}
}
/// Call `vkCmdBindVertexBuffers2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_bind_vertex_buffers2(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
p_strides: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_vertex_buffers2
.ok_or(CallError::MissingCommand("vkCmdBindVertexBuffers2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
p_strides,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindVertexBuffers2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_bind_vertex_buffers2(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
p_strides: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_vertex_buffers2(
self,
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
p_strides,
)
}
}
}
/// Call `vkCmdBindVertexBuffers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_bind_vertex_buffers2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
p_strides: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_vertex_buffers2_ext
.ok_or(CallError::MissingCommand("vkCmdBindVertexBuffers2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
p_strides,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindVertexBuffers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_bind_vertex_buffers2_ext(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_buffers: *const vk::Buffer,
p_offsets: *const vk::DeviceSize,
p_sizes: *const vk::DeviceSize,
p_strides: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_vertex_buffers2_ext(
self,
command_buffer,
first_binding,
binding_count,
p_buffers,
p_offsets,
p_sizes,
p_strides,
)
}
}
}
/// Call `vkCmdSetDepthTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_test_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_test_enable
.ok_or(CallError::MissingCommand("vkCmdSetDepthTestEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_test_enable(
&self,
command_buffer: vk::CommandBuffer,
depth_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_test_enable(self, command_buffer, depth_test_enable) }
}
}
/// Call `vkCmdSetDepthTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_test_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_test_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthTestEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_test_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_test_enable_ext(self, command_buffer, depth_test_enable) }
}
}
/// Call `vkCmdSetDepthWriteEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthWriteEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_write_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_write_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_write_enable
.ok_or(CallError::MissingCommand("vkCmdSetDepthWriteEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_write_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthWriteEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthWriteEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_write_enable(
&self,
command_buffer: vk::CommandBuffer,
depth_write_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_write_enable(self, command_buffer, depth_write_enable) }
}
}
/// Call `vkCmdSetDepthWriteEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthWriteEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_write_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_write_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_write_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthWriteEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_write_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthWriteEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthWriteEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_write_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_write_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_write_enable_ext(self, command_buffer, depth_write_enable) }
}
}
/// Call `vkCmdSetDepthCompareOp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthCompareOp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_compare_op(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_compare_op: vk::CompareOp,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_compare_op
.ok_or(CallError::MissingCommand("vkCmdSetDepthCompareOp"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_compare_op) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthCompareOp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthCompareOp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_compare_op(
&self,
command_buffer: vk::CommandBuffer,
depth_compare_op: vk::CompareOp,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_compare_op(self, command_buffer, depth_compare_op) }
}
}
/// Call `vkCmdSetDepthCompareOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthCompareOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_compare_op_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_compare_op: vk::CompareOp,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_compare_op_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthCompareOpEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_compare_op) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthCompareOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthCompareOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_compare_op_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_compare_op: vk::CompareOp,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_compare_op_ext(self, command_buffer, depth_compare_op) }
}
}
/// Call `vkCmdSetDepthBoundsTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBoundsTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_bounds_test_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_bounds_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bounds_test_enable
.ok_or(CallError::MissingCommand("vkCmdSetDepthBoundsTestEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_bounds_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBoundsTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBoundsTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_bounds_test_enable(
&self,
command_buffer: vk::CommandBuffer,
depth_bounds_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bounds_test_enable(self, command_buffer, depth_bounds_test_enable) }
}
}
/// Call `vkCmdSetDepthBoundsTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBoundsTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_bounds_test_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_bounds_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_depth_bounds_test_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetDepthBoundsTestEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_bounds_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBoundsTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBoundsTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_bounds_test_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_bounds_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bounds_test_enable_ext(self, command_buffer, depth_bounds_test_enable) }
}
}
/// Call `vkCmdSetStencilTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_stencil_test_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
stencil_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_test_enable
.ok_or(CallError::MissingCommand("vkCmdSetStencilTestEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stencil_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilTestEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilTestEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_stencil_test_enable(
&self,
command_buffer: vk::CommandBuffer,
stencil_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_stencil_test_enable(self, command_buffer, stencil_test_enable) }
}
}
/// Call `vkCmdSetStencilTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_stencil_test_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
stencil_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_test_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetStencilTestEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stencil_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilTestEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilTestEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_stencil_test_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
stencil_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_stencil_test_enable_ext(self, command_buffer, stencil_test_enable) }
}
}
/// Call `vkCmdSetStencilOp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilOp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_stencil_op(
device: &Device,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
fail_op: vk::StencilOp,
pass_op: vk::StencilOp,
depth_fail_op: vk::StencilOp,
compare_op: vk::CompareOp,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_op
.ok_or(CallError::MissingCommand("vkCmdSetStencilOp"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
face_mask,
fail_op,
pass_op,
depth_fail_op,
compare_op,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilOp` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilOp` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_stencil_op(
&self,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
fail_op: vk::StencilOp,
pass_op: vk::StencilOp,
depth_fail_op: vk::StencilOp,
compare_op: vk::CompareOp,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_stencil_op(
self,
command_buffer,
face_mask,
fail_op,
pass_op,
depth_fail_op,
compare_op,
)
}
}
}
/// Call `vkCmdSetStencilOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_stencil_op_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
fail_op: vk::StencilOp,
pass_op: vk::StencilOp,
depth_fail_op: vk::StencilOp,
compare_op: vk::CompareOp,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_stencil_op_ext
.ok_or(CallError::MissingCommand("vkCmdSetStencilOpEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
face_mask,
fail_op,
pass_op,
depth_fail_op,
compare_op,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetStencilOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetStencilOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_stencil_op_ext(
&self,
command_buffer: vk::CommandBuffer,
face_mask: vk::StencilFaceFlags,
fail_op: vk::StencilOp,
pass_op: vk::StencilOp,
depth_fail_op: vk::StencilOp,
compare_op: vk::CompareOp,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_stencil_op_ext(
self,
command_buffer,
face_mask,
fail_op,
pass_op,
depth_fail_op,
compare_op,
)
}
}
}
/// Call `vkCmdSetPatchControlPointsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPatchControlPointsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_patch_control_points_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
patch_control_points: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_patch_control_points_ext
.ok_or(CallError::MissingCommand("vkCmdSetPatchControlPointsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, patch_control_points) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPatchControlPointsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPatchControlPointsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_patch_control_points_ext(
&self,
command_buffer: vk::CommandBuffer,
patch_control_points: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_patch_control_points_ext(self, command_buffer, patch_control_points) }
}
}
/// Call `vkCmdSetRasterizerDiscardEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizerDiscardEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rasterizer_discard_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
rasterizer_discard_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rasterizer_discard_enable
.ok_or(CallError::MissingCommand("vkCmdSetRasterizerDiscardEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, rasterizer_discard_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRasterizerDiscardEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizerDiscardEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rasterizer_discard_enable(
&self,
command_buffer: vk::CommandBuffer,
rasterizer_discard_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_rasterizer_discard_enable(self, command_buffer, rasterizer_discard_enable) }
}
}
/// Call `vkCmdSetRasterizerDiscardEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizerDiscardEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rasterizer_discard_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
rasterizer_discard_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_rasterizer_discard_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetRasterizerDiscardEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, rasterizer_discard_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRasterizerDiscardEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizerDiscardEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rasterizer_discard_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
rasterizer_discard_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_rasterizer_discard_enable_ext(self, command_buffer, rasterizer_discard_enable)
}
}
}
/// Call `vkCmdSetDepthBiasEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBiasEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_bias_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_bias_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bias_enable
.ok_or(CallError::MissingCommand("vkCmdSetDepthBiasEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_bias_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBiasEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBiasEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_bias_enable(
&self,
command_buffer: vk::CommandBuffer,
depth_bias_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bias_enable(self, command_buffer, depth_bias_enable) }
}
}
/// Call `vkCmdSetDepthBiasEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBiasEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_bias_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_bias_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bias_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthBiasEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_bias_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBiasEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBiasEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_bias_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_bias_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bias_enable_ext(self, command_buffer, depth_bias_enable) }
}
}
/// Call `vkCmdSetLogicOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLogicOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_logic_op_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
logic_op: vk::LogicOp,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_logic_op_ext
.ok_or(CallError::MissingCommand("vkCmdSetLogicOpEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, logic_op) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLogicOpEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLogicOpEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_logic_op_ext(
&self,
command_buffer: vk::CommandBuffer,
logic_op: vk::LogicOp,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_logic_op_ext(self, command_buffer, logic_op) }
}
}
/// Call `vkCmdSetPrimitiveRestartEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_primitive_restart_enable(
device: &Device,
command_buffer: vk::CommandBuffer,
primitive_restart_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_primitive_restart_enable
.ok_or(CallError::MissingCommand("vkCmdSetPrimitiveRestartEnable"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, primitive_restart_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPrimitiveRestartEnable` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartEnable` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_primitive_restart_enable(
&self,
command_buffer: vk::CommandBuffer,
primitive_restart_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_primitive_restart_enable(self, command_buffer, primitive_restart_enable) }
}
}
/// Call `vkCmdSetPrimitiveRestartEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_primitive_restart_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
primitive_restart_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_primitive_restart_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetPrimitiveRestartEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, primitive_restart_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPrimitiveRestartEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPrimitiveRestartEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_primitive_restart_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
primitive_restart_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_primitive_restart_enable_ext(self, command_buffer, primitive_restart_enable) }
}
}
/// Call `vkCmdSetTessellationDomainOriginEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetTessellationDomainOriginEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_tessellation_domain_origin_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
domain_origin: vk::TessellationDomainOrigin,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_tessellation_domain_origin_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetTessellationDomainOriginEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, domain_origin) };
Ok(())
}
impl Device {
/// Call `vkCmdSetTessellationDomainOriginEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetTessellationDomainOriginEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_tessellation_domain_origin_ext(
&self,
command_buffer: vk::CommandBuffer,
domain_origin: vk::TessellationDomainOrigin,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_tessellation_domain_origin_ext(self, command_buffer, domain_origin) }
}
}
/// Call `vkCmdSetDepthClampEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClampEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_clamp_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_clamp_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_clamp_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthClampEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_clamp_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthClampEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClampEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_clamp_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_clamp_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_clamp_enable_ext(self, command_buffer, depth_clamp_enable) }
}
}
/// Call `vkCmdSetPolygonModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPolygonModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_polygon_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
polygon_mode: vk::PolygonMode,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_polygon_mode_ext
.ok_or(CallError::MissingCommand("vkCmdSetPolygonModeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, polygon_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetPolygonModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetPolygonModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_polygon_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
polygon_mode: vk::PolygonMode,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_polygon_mode_ext(self, command_buffer, polygon_mode) }
}
}
/// Call `vkCmdSetRasterizationSamplesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizationSamplesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rasterization_samples_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
rasterization_samples: vk::SampleCountFlagBits,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rasterization_samples_ext
.ok_or(CallError::MissingCommand("vkCmdSetRasterizationSamplesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, rasterization_samples) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRasterizationSamplesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizationSamplesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rasterization_samples_ext(
&self,
command_buffer: vk::CommandBuffer,
rasterization_samples: vk::SampleCountFlagBits,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_rasterization_samples_ext(self, command_buffer, rasterization_samples) }
}
}
/// Call `vkCmdSetSampleMaskEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleMaskEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_sample_mask_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
samples: vk::SampleCountFlagBits,
p_sample_mask: *const vk::SampleMask,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_sample_mask_ext
.ok_or(CallError::MissingCommand("vkCmdSetSampleMaskEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, samples, p_sample_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdSetSampleMaskEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleMaskEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_sample_mask_ext(
&self,
command_buffer: vk::CommandBuffer,
samples: vk::SampleCountFlagBits,
p_sample_mask: *const vk::SampleMask,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_sample_mask_ext(self, command_buffer, samples, p_sample_mask) }
}
}
/// Call `vkCmdSetAlphaToCoverageEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAlphaToCoverageEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_alpha_to_coverage_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
alpha_to_coverage_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_alpha_to_coverage_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetAlphaToCoverageEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, alpha_to_coverage_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetAlphaToCoverageEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAlphaToCoverageEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_alpha_to_coverage_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
alpha_to_coverage_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_alpha_to_coverage_enable_ext(self, command_buffer, alpha_to_coverage_enable) }
}
}
/// Call `vkCmdSetAlphaToOneEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAlphaToOneEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_alpha_to_one_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
alpha_to_one_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_alpha_to_one_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetAlphaToOneEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, alpha_to_one_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetAlphaToOneEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetAlphaToOneEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_alpha_to_one_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
alpha_to_one_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_alpha_to_one_enable_ext(self, command_buffer, alpha_to_one_enable) }
}
}
/// Call `vkCmdSetLogicOpEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLogicOpEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_logic_op_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
logic_op_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_logic_op_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetLogicOpEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, logic_op_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLogicOpEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLogicOpEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_logic_op_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
logic_op_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_logic_op_enable_ext(self, command_buffer, logic_op_enable) }
}
}
/// Call `vkCmdSetColorBlendEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_color_blend_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_enables: *const vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_color_blend_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetColorBlendEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_attachment,
attachment_count,
p_color_blend_enables,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetColorBlendEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_color_blend_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_enables: *const vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_color_blend_enable_ext(
self,
command_buffer,
first_attachment,
attachment_count,
p_color_blend_enables,
)
}
}
}
/// Call `vkCmdSetColorBlendEquationEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendEquationEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_color_blend_equation_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_equations: *const vk::ColorBlendEquationEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_color_blend_equation_ext
.ok_or(CallError::MissingCommand("vkCmdSetColorBlendEquationEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_attachment,
attachment_count,
p_color_blend_equations,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetColorBlendEquationEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendEquationEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_color_blend_equation_ext(
&self,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_equations: *const vk::ColorBlendEquationEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_color_blend_equation_ext(
self,
command_buffer,
first_attachment,
attachment_count,
p_color_blend_equations,
)
}
}
}
/// Call `vkCmdSetColorWriteMaskEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorWriteMaskEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_color_write_mask_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_write_masks: *const vk::ColorComponentFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_color_write_mask_ext
.ok_or(CallError::MissingCommand("vkCmdSetColorWriteMaskEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_attachment,
attachment_count,
p_color_write_masks,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetColorWriteMaskEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorWriteMaskEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_color_write_mask_ext(
&self,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_write_masks: *const vk::ColorComponentFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_color_write_mask_ext(
self,
command_buffer,
first_attachment,
attachment_count,
p_color_write_masks,
)
}
}
}
/// Call `vkCmdSetRasterizationStreamEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizationStreamEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rasterization_stream_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
rasterization_stream: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rasterization_stream_ext
.ok_or(CallError::MissingCommand("vkCmdSetRasterizationStreamEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, rasterization_stream) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRasterizationStreamEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRasterizationStreamEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rasterization_stream_ext(
&self,
command_buffer: vk::CommandBuffer,
rasterization_stream: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_rasterization_stream_ext(self, command_buffer, rasterization_stream) }
}
}
/// Call `vkCmdSetConservativeRasterizationModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetConservativeRasterizationModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_conservative_rasterization_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
conservative_rasterization_mode: vk::ConservativeRasterizationModeEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_conservative_rasterization_mode_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetConservativeRasterizationModeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, conservative_rasterization_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetConservativeRasterizationModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetConservativeRasterizationModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_conservative_rasterization_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
conservative_rasterization_mode: vk::ConservativeRasterizationModeEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_conservative_rasterization_mode_ext(
self,
command_buffer,
conservative_rasterization_mode,
)
}
}
}
/// Call `vkCmdSetExtraPrimitiveOverestimationSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExtraPrimitiveOverestimationSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_extra_primitive_overestimation_size_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
extra_primitive_overestimation_size: f32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_extra_primitive_overestimation_size_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetExtraPrimitiveOverestimationSizeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, extra_primitive_overestimation_size) };
Ok(())
}
impl Device {
/// Call `vkCmdSetExtraPrimitiveOverestimationSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetExtraPrimitiveOverestimationSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_extra_primitive_overestimation_size_ext(
&self,
command_buffer: vk::CommandBuffer,
extra_primitive_overestimation_size: f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_extra_primitive_overestimation_size_ext(
self,
command_buffer,
extra_primitive_overestimation_size,
)
}
}
}
/// Call `vkCmdSetDepthClipEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClipEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_clip_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_clip_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_clip_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthClipEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_clip_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthClipEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClipEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_clip_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_clip_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_clip_enable_ext(self, command_buffer, depth_clip_enable) }
}
}
/// Call `vkCmdSetSampleLocationsEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleLocationsEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_sample_locations_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
sample_locations_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_sample_locations_enable_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetSampleLocationsEnableEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, sample_locations_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetSampleLocationsEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetSampleLocationsEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_sample_locations_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
sample_locations_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_sample_locations_enable_ext(self, command_buffer, sample_locations_enable) }
}
}
/// Call `vkCmdSetColorBlendAdvancedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendAdvancedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_color_blend_advanced_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_advanced: *const vk::ColorBlendAdvancedEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_color_blend_advanced_ext
.ok_or(CallError::MissingCommand("vkCmdSetColorBlendAdvancedEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_attachment,
attachment_count,
p_color_blend_advanced,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetColorBlendAdvancedEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorBlendAdvancedEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_color_blend_advanced_ext(
&self,
command_buffer: vk::CommandBuffer,
first_attachment: u32,
attachment_count: u32,
p_color_blend_advanced: *const vk::ColorBlendAdvancedEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_color_blend_advanced_ext(
self,
command_buffer,
first_attachment,
attachment_count,
p_color_blend_advanced,
)
}
}
}
/// Call `vkCmdSetProvokingVertexModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetProvokingVertexModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_provoking_vertex_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
provoking_vertex_mode: vk::ProvokingVertexModeEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_provoking_vertex_mode_ext
.ok_or(CallError::MissingCommand("vkCmdSetProvokingVertexModeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, provoking_vertex_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetProvokingVertexModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetProvokingVertexModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_provoking_vertex_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
provoking_vertex_mode: vk::ProvokingVertexModeEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_provoking_vertex_mode_ext(self, command_buffer, provoking_vertex_mode) }
}
}
/// Call `vkCmdSetLineRasterizationModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineRasterizationModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_line_rasterization_mode_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
line_rasterization_mode: vk::LineRasterizationModeEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_line_rasterization_mode_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetLineRasterizationModeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, line_rasterization_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineRasterizationModeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineRasterizationModeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_line_rasterization_mode_ext(
&self,
command_buffer: vk::CommandBuffer,
line_rasterization_mode: vk::LineRasterizationModeEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_line_rasterization_mode_ext(self, command_buffer, line_rasterization_mode) }
}
}
/// Call `vkCmdSetLineStippleEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_line_stipple_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
stippled_line_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_line_stipple_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetLineStippleEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stippled_line_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetLineStippleEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetLineStippleEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_line_stipple_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
stippled_line_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_line_stipple_enable_ext(self, command_buffer, stippled_line_enable) }
}
}
/// Call `vkCmdSetDepthClipNegativeOneToOneEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClipNegativeOneToOneEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_clip_negative_one_to_one_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
negative_one_to_one: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_clip_negative_one_to_one_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetDepthClipNegativeOneToOneEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, negative_one_to_one) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthClipNegativeOneToOneEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClipNegativeOneToOneEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_clip_negative_one_to_one_ext(
&self,
command_buffer: vk::CommandBuffer,
negative_one_to_one: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_clip_negative_one_to_one_ext(self, command_buffer, negative_one_to_one) }
}
}
/// Call `vkCmdSetViewportWScalingEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWScalingEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_w_scaling_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
viewport_w_scaling_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_viewport_w_scaling_enable_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetViewportWScalingEnableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, viewport_w_scaling_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportWScalingEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportWScalingEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_w_scaling_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
viewport_w_scaling_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_viewport_w_scaling_enable_nv(self, command_buffer, viewport_w_scaling_enable) }
}
}
/// Call `vkCmdSetViewportSwizzleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportSwizzleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_viewport_swizzle_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_viewport_swizzles: *const vk::ViewportSwizzleNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_viewport_swizzle_nv
.ok_or(CallError::MissingCommand("vkCmdSetViewportSwizzleNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_viewport,
viewport_count,
p_viewport_swizzles,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetViewportSwizzleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetViewportSwizzleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_viewport_swizzle_nv(
&self,
command_buffer: vk::CommandBuffer,
first_viewport: u32,
viewport_count: u32,
p_viewport_swizzles: *const vk::ViewportSwizzleNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_viewport_swizzle_nv(
self,
command_buffer,
first_viewport,
viewport_count,
p_viewport_swizzles,
)
}
}
}
/// Call `vkCmdSetCoverageToColorEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageToColorEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_to_color_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_to_color_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_coverage_to_color_enable_nv
.ok_or(CallError::MissingCommand("vkCmdSetCoverageToColorEnableNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, coverage_to_color_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageToColorEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageToColorEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_to_color_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_to_color_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_coverage_to_color_enable_nv(self, command_buffer, coverage_to_color_enable) }
}
}
/// Call `vkCmdSetCoverageToColorLocationNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageToColorLocationNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_to_color_location_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_to_color_location: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_coverage_to_color_location_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetCoverageToColorLocationNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, coverage_to_color_location) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageToColorLocationNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageToColorLocationNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_to_color_location_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_to_color_location: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_coverage_to_color_location_nv(self, command_buffer, coverage_to_color_location)
}
}
}
/// Call `vkCmdSetCoverageModulationModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_modulation_mode_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_modulation_mode: vk::CoverageModulationModeNV,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_coverage_modulation_mode_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetCoverageModulationModeNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, coverage_modulation_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageModulationModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_modulation_mode_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_modulation_mode: vk::CoverageModulationModeNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_coverage_modulation_mode_nv(self, command_buffer, coverage_modulation_mode) }
}
}
/// Call `vkCmdSetCoverageModulationTableEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationTableEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_modulation_table_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_modulation_table_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_coverage_modulation_table_enable_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetCoverageModulationTableEnableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, coverage_modulation_table_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageModulationTableEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationTableEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_modulation_table_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_modulation_table_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_coverage_modulation_table_enable_nv(
self,
command_buffer,
coverage_modulation_table_enable,
)
}
}
}
/// Call `vkCmdSetCoverageModulationTableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationTableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_modulation_table_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_modulation_table_count: u32,
p_coverage_modulation_table: *const f32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_coverage_modulation_table_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetCoverageModulationTableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
coverage_modulation_table_count,
p_coverage_modulation_table,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageModulationTableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageModulationTableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_modulation_table_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_modulation_table_count: u32,
p_coverage_modulation_table: *const f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_coverage_modulation_table_nv(
self,
command_buffer,
coverage_modulation_table_count,
p_coverage_modulation_table,
)
}
}
}
/// Call `vkCmdSetShadingRateImageEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetShadingRateImageEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_shading_rate_image_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
shading_rate_image_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_shading_rate_image_enable_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetShadingRateImageEnableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, shading_rate_image_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetShadingRateImageEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetShadingRateImageEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_shading_rate_image_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
shading_rate_image_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_shading_rate_image_enable_nv(self, command_buffer, shading_rate_image_enable) }
}
}
/// Call `vkCmdSetCoverageReductionModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageReductionModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_coverage_reduction_mode_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
coverage_reduction_mode: vk::CoverageReductionModeNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_coverage_reduction_mode_nv
.ok_or(CallError::MissingCommand("vkCmdSetCoverageReductionModeNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, coverage_reduction_mode) };
Ok(())
}
impl Device {
/// Call `vkCmdSetCoverageReductionModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetCoverageReductionModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_coverage_reduction_mode_nv(
&self,
command_buffer: vk::CommandBuffer,
coverage_reduction_mode: vk::CoverageReductionModeNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_coverage_reduction_mode_nv(self, command_buffer, coverage_reduction_mode) }
}
}
/// Call `vkCmdSetRepresentativeFragmentTestEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRepresentativeFragmentTestEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_representative_fragment_test_enable_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
representative_fragment_test_enable: vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_representative_fragment_test_enable_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetRepresentativeFragmentTestEnableNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, representative_fragment_test_enable) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRepresentativeFragmentTestEnableNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRepresentativeFragmentTestEnableNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_representative_fragment_test_enable_nv(
&self,
command_buffer: vk::CommandBuffer,
representative_fragment_test_enable: vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_representative_fragment_test_enable_nv(
self,
command_buffer,
representative_fragment_test_enable,
)
}
}
}
/// Call `vkCreatePrivateDataSlot` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePrivateDataSlot` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_private_data_slot(
device: &Device,
p_create_info: *const vk::PrivateDataSlotCreateInfo,
p_allocator: *const vk::AllocationCallbacks,
p_private_data_slot: *mut vk::PrivateDataSlot,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_private_data_slot
.ok_or(CallError::MissingCommand("vkCreatePrivateDataSlot"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_private_data_slot,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreatePrivateDataSlot` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePrivateDataSlot` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_private_data_slot(
&self,
p_create_info: *const vk::PrivateDataSlotCreateInfo,
p_allocator: *const vk::AllocationCallbacks,
p_private_data_slot: *mut vk::PrivateDataSlot,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_private_data_slot(self, p_create_info, p_allocator, p_private_data_slot) }
}
}
/// Call `vkCreatePrivateDataSlotEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePrivateDataSlotEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_private_data_slot_ext(
device: &Device,
p_create_info: *const vk::PrivateDataSlotCreateInfo,
p_allocator: *const vk::AllocationCallbacks,
p_private_data_slot: *mut vk::PrivateDataSlot,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_private_data_slot_ext
.ok_or(CallError::MissingCommand("vkCreatePrivateDataSlotEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_private_data_slot,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreatePrivateDataSlotEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreatePrivateDataSlotEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_private_data_slot_ext(
&self,
p_create_info: *const vk::PrivateDataSlotCreateInfo,
p_allocator: *const vk::AllocationCallbacks,
p_private_data_slot: *mut vk::PrivateDataSlot,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_private_data_slot_ext(self, p_create_info, p_allocator, p_private_data_slot) }
}
}
/// Call `vkDestroyPrivateDataSlot` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPrivateDataSlot` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_private_data_slot(
device: &Device,
private_data_slot: vk::PrivateDataSlot,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_private_data_slot
.ok_or(CallError::MissingCommand("vkDestroyPrivateDataSlot"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), private_data_slot, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyPrivateDataSlot` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPrivateDataSlot` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_private_data_slot(
&self,
private_data_slot: vk::PrivateDataSlot,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_private_data_slot(self, private_data_slot, p_allocator) }
}
}
/// Call `vkDestroyPrivateDataSlotEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPrivateDataSlotEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_private_data_slot_ext(
device: &Device,
private_data_slot: vk::PrivateDataSlot,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_private_data_slot_ext
.ok_or(CallError::MissingCommand("vkDestroyPrivateDataSlotEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), private_data_slot, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyPrivateDataSlotEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyPrivateDataSlotEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_private_data_slot_ext(
&self,
private_data_slot: vk::PrivateDataSlot,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_private_data_slot_ext(self, private_data_slot, p_allocator) }
}
}
/// Call `vkSetPrivateData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetPrivateData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_private_data(
device: &Device,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
data: u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_private_data
.ok_or(CallError::MissingCommand("vkSetPrivateData"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
object_type,
object_handle,
private_data_slot,
data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetPrivateData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetPrivateData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_private_data(
&self,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
data: u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_private_data(self, object_type, object_handle, private_data_slot, data) }
}
}
/// Call `vkSetPrivateDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetPrivateDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_private_data_ext(
device: &Device,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
data: u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_private_data_ext
.ok_or(CallError::MissingCommand("vkSetPrivateDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
object_type,
object_handle,
private_data_slot,
data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetPrivateDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetPrivateDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_private_data_ext(
&self,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
data: u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_private_data_ext(self, object_type, object_handle, private_data_slot, data) }
}
}
/// Call `vkGetPrivateData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPrivateData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_private_data(
device: &Device,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
p_data: *mut u64,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_private_data
.ok_or(CallError::MissingCommand("vkGetPrivateData"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
object_type,
object_handle,
private_data_slot,
p_data,
)
};
Ok(())
}
impl Device {
/// Call `vkGetPrivateData` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPrivateData` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_private_data(
&self,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
p_data: *mut u64,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_private_data(self, object_type, object_handle, private_data_slot, p_data) }
}
}
/// Call `vkGetPrivateDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPrivateDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_private_data_ext(
device: &Device,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
p_data: *mut u64,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_private_data_ext
.ok_or(CallError::MissingCommand("vkGetPrivateDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
object_type,
object_handle,
private_data_slot,
p_data,
)
};
Ok(())
}
impl Device {
/// Call `vkGetPrivateDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPrivateDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_private_data_ext(
&self,
object_type: vk::ObjectType,
object_handle: u64,
private_data_slot: vk::PrivateDataSlot,
p_data: *mut u64,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_private_data_ext(self, object_type, object_handle, private_data_slot, p_data) }
}
}
/// Call `vkCmdCopyBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer2(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_info: &vk::CopyBufferInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer2
.ok_or(CallError::MissingCommand("vkCmdCopyBuffer2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_buffer_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer2(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_info: &vk::CopyBufferInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_buffer2(self, command_buffer, copy_buffer_info) }
}
}
/// Call `vkCmdCopyBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_info: &vk::CopyBufferInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer2_khr
.ok_or(CallError::MissingCommand("vkCmdCopyBuffer2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_buffer_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer2_khr(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_info: &vk::CopyBufferInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_buffer2_khr(self, command_buffer, copy_buffer_info) }
}
}
/// Call `vkCmdCopyImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image2(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_image_info: &vk::CopyImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image2
.ok_or(CallError::MissingCommand("vkCmdCopyImage2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image2(
&self,
command_buffer: vk::CommandBuffer,
copy_image_info: &vk::CopyImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_image2(self, command_buffer, copy_image_info) }
}
}
/// Call `vkCmdCopyImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_image_info: &vk::CopyImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image2_khr
.ok_or(CallError::MissingCommand("vkCmdCopyImage2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image2_khr(
&self,
command_buffer: vk::CommandBuffer,
copy_image_info: &vk::CopyImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_image2_khr(self, command_buffer, copy_image_info) }
}
}
/// Call `vkCmdBlitImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_blit_image2(
device: &Device,
command_buffer: vk::CommandBuffer,
blit_image_info: &vk::BlitImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_blit_image2
.ok_or(CallError::MissingCommand("vkCmdBlitImage2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, blit_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBlitImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_blit_image2(
&self,
command_buffer: vk::CommandBuffer,
blit_image_info: &vk::BlitImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_blit_image2(self, command_buffer, blit_image_info) }
}
}
/// Call `vkCmdBlitImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_blit_image2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
blit_image_info: &vk::BlitImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_blit_image2_khr
.ok_or(CallError::MissingCommand("vkCmdBlitImage2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, blit_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBlitImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBlitImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_blit_image2_khr(
&self,
command_buffer: vk::CommandBuffer,
blit_image_info: &vk::BlitImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_blit_image2_khr(self, command_buffer, blit_image_info) }
}
}
/// Call `vkCmdCopyBufferToImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer_to_image2(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer_to_image2
.ok_or(CallError::MissingCommand("vkCmdCopyBufferToImage2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_buffer_to_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyBufferToImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer_to_image2(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_buffer_to_image2(self, command_buffer, copy_buffer_to_image_info) }
}
}
/// Call `vkCmdCopyBufferToImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_buffer_to_image2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_buffer_to_image2_khr
.ok_or(CallError::MissingCommand("vkCmdCopyBufferToImage2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_buffer_to_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyBufferToImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyBufferToImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_buffer_to_image2_khr(
&self,
command_buffer: vk::CommandBuffer,
copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_buffer_to_image2_khr(self, command_buffer, copy_buffer_to_image_info) }
}
}
/// Call `vkCmdCopyImageToBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image_to_buffer2(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image_to_buffer2
.ok_or(CallError::MissingCommand("vkCmdCopyImageToBuffer2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_image_to_buffer_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyImageToBuffer2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image_to_buffer2(
&self,
command_buffer: vk::CommandBuffer,
copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_image_to_buffer2(self, command_buffer, copy_image_to_buffer_info) }
}
}
/// Call `vkCmdCopyImageToBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_copy_image_to_buffer2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image_to_buffer2_khr
.ok_or(CallError::MissingCommand("vkCmdCopyImageToBuffer2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, copy_image_to_buffer_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyImageToBuffer2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToBuffer2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_copy_image_to_buffer2_khr(
&self,
command_buffer: vk::CommandBuffer,
copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_image_to_buffer2_khr(self, command_buffer, copy_image_to_buffer_info) }
}
}
/// Call `vkCmdResolveImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_resolve_image2(
device: &Device,
command_buffer: vk::CommandBuffer,
resolve_image_info: &vk::ResolveImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_resolve_image2
.ok_or(CallError::MissingCommand("vkCmdResolveImage2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, resolve_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdResolveImage2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_resolve_image2(
&self,
command_buffer: vk::CommandBuffer,
resolve_image_info: &vk::ResolveImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_resolve_image2(self, command_buffer, resolve_image_info) }
}
}
/// Call `vkCmdResolveImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_resolve_image2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
resolve_image_info: &vk::ResolveImageInfo2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_resolve_image2_khr
.ok_or(CallError::MissingCommand("vkCmdResolveImage2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, resolve_image_info) };
Ok(())
}
impl Device {
/// Call `vkCmdResolveImage2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResolveImage2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_resolve_image2_khr(
&self,
command_buffer: vk::CommandBuffer,
resolve_image_info: &vk::ResolveImageInfo2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_resolve_image2_khr(self, command_buffer, resolve_image_info) }
}
}
/// Call `vkCmdSetFragmentShadingRateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFragmentShadingRateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_fragment_shading_rate_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_fragment_size: *const vk::Extent2D,
combiner_ops: *const vk::FragmentShadingRateCombinerOpKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_fragment_shading_rate_khr
.ok_or(CallError::MissingCommand("vkCmdSetFragmentShadingRateKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_fragment_size, combiner_ops) };
Ok(())
}
impl Device {
/// Call `vkCmdSetFragmentShadingRateKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFragmentShadingRateKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_fragment_shading_rate_khr(
&self,
command_buffer: vk::CommandBuffer,
p_fragment_size: *const vk::Extent2D,
combiner_ops: *const vk::FragmentShadingRateCombinerOpKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_fragment_shading_rate_khr(self, command_buffer, p_fragment_size, combiner_ops)
}
}
}
/// Call `vkGetPhysicalDeviceFragmentShadingRatesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFragmentShadingRatesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_fragment_shading_rates_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_fragment_shading_rate_count: *mut u32,
p_fragment_shading_rates: *mut vk::PhysicalDeviceFragmentShadingRateKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_fragment_shading_rates_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceFragmentShadingRatesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_fragment_shading_rate_count,
p_fragment_shading_rates,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceFragmentShadingRatesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceFragmentShadingRatesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_fragment_shading_rates_khr(
&self,
physical_device: vk::PhysicalDevice,
p_fragment_shading_rate_count: *mut u32,
p_fragment_shading_rates: *mut vk::PhysicalDeviceFragmentShadingRateKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_fragment_shading_rates_khr(
self,
physical_device,
p_fragment_shading_rate_count,
p_fragment_shading_rates,
)
}
}
}
/// Call `vkCmdSetFragmentShadingRateEnumNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFragmentShadingRateEnumNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_fragment_shading_rate_enum_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
shading_rate: vk::FragmentShadingRateNV,
combiner_ops: *const vk::FragmentShadingRateCombinerOpKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_fragment_shading_rate_enum_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetFragmentShadingRateEnumNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, shading_rate, combiner_ops) };
Ok(())
}
impl Device {
/// Call `vkCmdSetFragmentShadingRateEnumNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetFragmentShadingRateEnumNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_fragment_shading_rate_enum_nv(
&self,
command_buffer: vk::CommandBuffer,
shading_rate: vk::FragmentShadingRateNV,
combiner_ops: *const vk::FragmentShadingRateCombinerOpKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_fragment_shading_rate_enum_nv(self, command_buffer, shading_rate, combiner_ops)
}
}
}
/// Call `vkGetAccelerationStructureBuildSizesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureBuildSizesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_acceleration_structure_build_sizes_khr(
device: &Device,
build_type: vk::AccelerationStructureBuildTypeKHR,
p_build_info: *const vk::AccelerationStructureBuildGeometryInfoKHR,
p_max_primitive_counts: *const u32,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_acceleration_structure_build_sizes_khr
.ok_or(CallError::MissingCommand(
"vkGetAccelerationStructureBuildSizesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
build_type,
p_build_info,
p_max_primitive_counts,
p_size_info,
)
};
Ok(())
}
impl Device {
/// Call `vkGetAccelerationStructureBuildSizesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureBuildSizesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_acceleration_structure_build_sizes_khr(
&self,
build_type: vk::AccelerationStructureBuildTypeKHR,
p_build_info: *const vk::AccelerationStructureBuildGeometryInfoKHR,
p_max_primitive_counts: *const u32,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_acceleration_structure_build_sizes_khr(
self,
build_type,
p_build_info,
p_max_primitive_counts,
p_size_info,
)
}
}
}
/// Call `vkCmdSetVertexInputEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetVertexInputEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_vertex_input_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
vertex_binding_description_count: u32,
p_vertex_binding_descriptions: *const vk::VertexInputBindingDescription2EXT,
vertex_attribute_description_count: u32,
p_vertex_attribute_descriptions: *const vk::VertexInputAttributeDescription2EXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_vertex_input_ext
.ok_or(CallError::MissingCommand("vkCmdSetVertexInputEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
vertex_binding_description_count,
p_vertex_binding_descriptions,
vertex_attribute_description_count,
p_vertex_attribute_descriptions,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetVertexInputEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetVertexInputEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_vertex_input_ext(
&self,
command_buffer: vk::CommandBuffer,
vertex_binding_description_count: u32,
p_vertex_binding_descriptions: *const vk::VertexInputBindingDescription2EXT,
vertex_attribute_description_count: u32,
p_vertex_attribute_descriptions: *const vk::VertexInputAttributeDescription2EXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_vertex_input_ext(
self,
command_buffer,
vertex_binding_description_count,
p_vertex_binding_descriptions,
vertex_attribute_description_count,
p_vertex_attribute_descriptions,
)
}
}
}
/// Call `vkCmdSetColorWriteEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorWriteEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_color_write_enable_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
attachment_count: u32,
p_color_write_enables: *const vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_color_write_enable_ext
.ok_or(CallError::MissingCommand("vkCmdSetColorWriteEnableEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, attachment_count, p_color_write_enables) };
Ok(())
}
impl Device {
/// Call `vkCmdSetColorWriteEnableEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetColorWriteEnableEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_color_write_enable_ext(
&self,
command_buffer: vk::CommandBuffer,
attachment_count: u32,
p_color_write_enables: *const vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_color_write_enable_ext(
self,
command_buffer,
attachment_count,
p_color_write_enables,
)
}
}
}
/// Call `vkCmdSetEvent2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_event2(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_event2
.ok_or(CallError::MissingCommand("vkCmdSetEvent2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, dependency_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetEvent2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_event2(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_event2(self, command_buffer, event, dependency_info) }
}
}
/// Call `vkCmdSetEvent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_set_event2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_event2_khr
.ok_or(CallError::MissingCommand("vkCmdSetEvent2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, dependency_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetEvent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetEvent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_set_event2_khr(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_event2_khr(self, command_buffer, event, dependency_info) }
}
}
/// Call `vkCmdResetEvent2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_reset_event2(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_reset_event2
.ok_or(CallError::MissingCommand("vkCmdResetEvent2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, stage_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdResetEvent2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_reset_event2(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_reset_event2(self, command_buffer, event, stage_mask) }
}
}
/// Call `vkCmdResetEvent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_reset_event2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_reset_event2_khr
.ok_or(CallError::MissingCommand("vkCmdResetEvent2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, event, stage_mask) };
Ok(())
}
impl Device {
/// Call `vkCmdResetEvent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdResetEvent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_reset_event2_khr(
&self,
command_buffer: vk::CommandBuffer,
event: vk::Event,
stage_mask: vk::PipelineStageFlags2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_reset_event2_khr(self, command_buffer, event, stage_mask) }
}
}
/// Call `vkCmdWaitEvents2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_wait_events2(
device: &Device,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
dependency_infos: &[vk::DependencyInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_wait_events2
.ok_or(CallError::MissingCommand("vkCmdWaitEvents2"))?;
let event_count =
u32::try_from(events.len()).map_err(|_| CallError::CountOverflow(events.len()))?;
if dependency_infos.len() != events.len() {
return Err(CallError::SliceLengthMismatch {
parameter: "dependency_infos",
expected: events.len(),
actual: dependency_infos.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
event_count,
events.as_ptr(),
dependency_infos.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWaitEvents2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_wait_events2(
&self,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
dependency_infos: &[vk::DependencyInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_wait_events2(self, command_buffer, events, dependency_infos) }
}
}
/// Call `vkCmdWaitEvents2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_wait_events2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
dependency_infos: &[vk::DependencyInfo],
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_wait_events2_khr
.ok_or(CallError::MissingCommand("vkCmdWaitEvents2KHR"))?;
let event_count =
u32::try_from(events.len()).map_err(|_| CallError::CountOverflow(events.len()))?;
if dependency_infos.len() != events.len() {
return Err(CallError::SliceLengthMismatch {
parameter: "dependency_infos",
expected: events.len(),
actual: dependency_infos.len(),
});
}
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
event_count,
events.as_ptr(),
dependency_infos.as_ptr(),
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWaitEvents2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWaitEvents2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_wait_events2_khr(
&self,
command_buffer: vk::CommandBuffer,
events: &[vk::Event],
dependency_infos: &[vk::DependencyInfo],
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_wait_events2_khr(self, command_buffer, events, dependency_infos) }
}
}
/// Call `vkCmdPipelineBarrier2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_pipeline_barrier2(
device: &Device,
command_buffer: vk::CommandBuffer,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_pipeline_barrier2
.ok_or(CallError::MissingCommand("vkCmdPipelineBarrier2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, dependency_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPipelineBarrier2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_pipeline_barrier2(
&self,
command_buffer: vk::CommandBuffer,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_pipeline_barrier2(self, command_buffer, dependency_info) }
}
}
/// Call `vkCmdPipelineBarrier2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_pipeline_barrier2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_pipeline_barrier2_khr
.ok_or(CallError::MissingCommand("vkCmdPipelineBarrier2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, dependency_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPipelineBarrier2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPipelineBarrier2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_pipeline_barrier2_khr(
&self,
command_buffer: vk::CommandBuffer,
dependency_info: &vk::DependencyInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_pipeline_barrier2_khr(self, command_buffer, dependency_info) }
}
}
/// Call `vkQueueSubmit2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSubmit2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn queue_submit2(
device: &Device,
queue: vk::Queue,
submits: &[vk::SubmitInfo2],
fence: vk::Fence,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_submit2
.ok_or(CallError::MissingCommand("vkQueueSubmit2"))?;
let submit_count =
u32::try_from(submits.len()).map_err(|_| CallError::CountOverflow(submits.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, submit_count, submits.as_ptr(), fence) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkQueueSubmit2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSubmit2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn queue_submit2(
&self,
queue: vk::Queue,
submits: &[vk::SubmitInfo2],
fence: vk::Fence,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_submit2(self, queue, submits, fence) }
}
}
/// Call `vkQueueSubmit2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSubmit2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn queue_submit2_khr(
device: &Device,
queue: vk::Queue,
submits: &[vk::SubmitInfo2],
fence: vk::Fence,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_submit2_khr
.ok_or(CallError::MissingCommand("vkQueueSubmit2KHR"))?;
let submit_count =
u32::try_from(submits.len()).map_err(|_| CallError::CountOverflow(submits.len()))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, submit_count, submits.as_ptr(), fence) };
if result != vk::Result::SUCCESS {
return Err(CallError::Vulkan(result));
}
Ok(())
}
impl Device {
/// Call `vkQueueSubmit2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSubmit2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn queue_submit2_khr(
&self,
queue: vk::Queue,
submits: &[vk::SubmitInfo2],
fence: vk::Fence,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_submit2_khr(self, queue, submits, fence) }
}
}
/// Call `vkCmdWriteTimestamp2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_write_timestamp2(
device: &Device,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_timestamp2
.ok_or(CallError::MissingCommand("vkCmdWriteTimestamp2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stage, query_pool, query) };
Ok(())
}
impl Device {
/// Call `vkCmdWriteTimestamp2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_write_timestamp2(
&self,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_write_timestamp2(self, command_buffer, stage, query_pool, query) }
}
}
/// Call `vkCmdWriteTimestamp2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
pub unsafe fn cmd_write_timestamp2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_timestamp2_khr
.ok_or(CallError::MissingCommand("vkCmdWriteTimestamp2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stage, query_pool, query) };
Ok(())
}
impl Device {
/// Call `vkCmdWriteTimestamp2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command, invalid slice lengths/counts or a native error.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteTimestamp2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
#[inline]
pub unsafe fn cmd_write_timestamp2_khr(
&self,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
query_pool: vk::QueryPool,
query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_write_timestamp2_khr(self, command_buffer, stage, query_pool, query) }
}
}
/// Call `vkCmdWriteBufferMarker2AMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteBufferMarker2AMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_buffer_marker2_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
marker: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_buffer_marker2_amd
.ok_or(CallError::MissingCommand("vkCmdWriteBufferMarker2AMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stage, dst_buffer, dst_offset, marker) };
Ok(())
}
impl Device {
/// Call `vkCmdWriteBufferMarker2AMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteBufferMarker2AMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_buffer_marker2_amd(
&self,
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
marker: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_write_buffer_marker2_amd(self, command_buffer, stage, dst_buffer, dst_offset, marker)
}
}
}
/// Call `vkGetQueueCheckpointData2NV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueueCheckpointData2NV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_queue_checkpoint_data2_nv(
device: &Device,
queue: vk::Queue,
p_checkpoint_data_count: *mut u32,
p_checkpoint_data: *mut vk::CheckpointData2NV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_queue_checkpoint_data2_nv
.ok_or(CallError::MissingCommand("vkGetQueueCheckpointData2NV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, p_checkpoint_data_count, p_checkpoint_data) };
Ok(())
}
impl Device {
/// Call `vkGetQueueCheckpointData2NV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetQueueCheckpointData2NV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_queue_checkpoint_data2_nv(
&self,
queue: vk::Queue,
p_checkpoint_data_count: *mut u32,
p_checkpoint_data: *mut vk::CheckpointData2NV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_queue_checkpoint_data2_nv(self, queue, p_checkpoint_data_count, p_checkpoint_data)
}
}
}
/// Call `vkCopyMemoryToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_memory_to_image(
device: &Device,
p_copy_memory_to_image_info: *const vk::CopyMemoryToImageInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_memory_to_image
.ok_or(CallError::MissingCommand("vkCopyMemoryToImage"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_memory_to_image_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMemoryToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_memory_to_image(
&self,
p_copy_memory_to_image_info: *const vk::CopyMemoryToImageInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_memory_to_image(self, p_copy_memory_to_image_info) }
}
}
/// Call `vkCopyMemoryToImageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToImageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_memory_to_image_ext(
device: &Device,
p_copy_memory_to_image_info: *const vk::CopyMemoryToImageInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_memory_to_image_ext
.ok_or(CallError::MissingCommand("vkCopyMemoryToImageEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_memory_to_image_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMemoryToImageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToImageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_memory_to_image_ext(
&self,
p_copy_memory_to_image_info: *const vk::CopyMemoryToImageInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_memory_to_image_ext(self, p_copy_memory_to_image_info) }
}
}
/// Call `vkCopyImageToMemory` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToMemory` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_image_to_memory(
device: &Device,
p_copy_image_to_memory_info: *const vk::CopyImageToMemoryInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_image_to_memory
.ok_or(CallError::MissingCommand("vkCopyImageToMemory"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_image_to_memory_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyImageToMemory` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToMemory` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_image_to_memory(
&self,
p_copy_image_to_memory_info: *const vk::CopyImageToMemoryInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_image_to_memory(self, p_copy_image_to_memory_info) }
}
}
/// Call `vkCopyImageToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_image_to_memory_ext(
device: &Device,
p_copy_image_to_memory_info: *const vk::CopyImageToMemoryInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_image_to_memory_ext
.ok_or(CallError::MissingCommand("vkCopyImageToMemoryEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_image_to_memory_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyImageToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_image_to_memory_ext(
&self,
p_copy_image_to_memory_info: *const vk::CopyImageToMemoryInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_image_to_memory_ext(self, p_copy_image_to_memory_info) }
}
}
/// Call `vkCopyImageToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_image_to_image(
device: &Device,
p_copy_image_to_image_info: *const vk::CopyImageToImageInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_image_to_image
.ok_or(CallError::MissingCommand("vkCopyImageToImage"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_image_to_image_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyImageToImage` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToImage` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_image_to_image(
&self,
p_copy_image_to_image_info: *const vk::CopyImageToImageInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_image_to_image(self, p_copy_image_to_image_info) }
}
}
/// Call `vkCopyImageToImageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToImageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_image_to_image_ext(
device: &Device,
p_copy_image_to_image_info: *const vk::CopyImageToImageInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_image_to_image_ext
.ok_or(CallError::MissingCommand("vkCopyImageToImageEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_copy_image_to_image_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyImageToImageEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyImageToImageEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_image_to_image_ext(
&self,
p_copy_image_to_image_info: *const vk::CopyImageToImageInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_image_to_image_ext(self, p_copy_image_to_image_info) }
}
}
/// Call `vkTransitionImageLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTransitionImageLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn transition_image_layout(
device: &Device,
transition_count: u32,
p_transitions: *const vk::HostImageLayoutTransitionInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.transition_image_layout
.ok_or(CallError::MissingCommand("vkTransitionImageLayout"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), transition_count, p_transitions) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkTransitionImageLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTransitionImageLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn transition_image_layout(
&self,
transition_count: u32,
p_transitions: *const vk::HostImageLayoutTransitionInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { transition_image_layout(self, transition_count, p_transitions) }
}
}
/// Call `vkTransitionImageLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTransitionImageLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn transition_image_layout_ext(
device: &Device,
transition_count: u32,
p_transitions: *const vk::HostImageLayoutTransitionInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.transition_image_layout_ext
.ok_or(CallError::MissingCommand("vkTransitionImageLayoutEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), transition_count, p_transitions) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkTransitionImageLayoutEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkTransitionImageLayoutEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn transition_image_layout_ext(
&self,
transition_count: u32,
p_transitions: *const vk::HostImageLayoutTransitionInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { transition_image_layout_ext(self, transition_count, p_transitions) }
}
}
/// Call `vkGetPhysicalDeviceVideoCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_video_capabilities_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_video_profile: *const vk::VideoProfileInfoKHR,
p_capabilities: *mut vk::VideoCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_video_capabilities_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceVideoCapabilitiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_video_profile, p_capabilities) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceVideoCapabilitiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoCapabilitiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_video_capabilities_khr(
&self,
physical_device: vk::PhysicalDevice,
p_video_profile: *const vk::VideoProfileInfoKHR,
p_capabilities: *mut vk::VideoCapabilitiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_video_capabilities_khr(
self,
physical_device,
p_video_profile,
p_capabilities,
)
}
}
}
/// Call `vkGetPhysicalDeviceVideoFormatPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoFormatPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_video_format_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_video_format_info: *const vk::PhysicalDeviceVideoFormatInfoKHR,
p_video_format_property_count: *mut u32,
p_video_format_properties: *mut vk::VideoFormatPropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_video_format_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceVideoFormatPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_video_format_info,
p_video_format_property_count,
p_video_format_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceVideoFormatPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoFormatPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_video_format_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
p_video_format_info: *const vk::PhysicalDeviceVideoFormatInfoKHR,
p_video_format_property_count: *mut u32,
p_video_format_properties: *mut vk::VideoFormatPropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_video_format_properties_khr(
self,
physical_device,
p_video_format_info,
p_video_format_property_count,
p_video_format_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_video_encode_quality_level_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_quality_level_info: *const vk::PhysicalDeviceVideoEncodeQualityLevelInfoKHR,
p_quality_level_properties: *mut vk::VideoEncodeQualityLevelPropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_video_encode_quality_level_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_quality_level_info,
p_quality_level_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_video_encode_quality_level_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
p_quality_level_info: *const vk::PhysicalDeviceVideoEncodeQualityLevelInfoKHR,
p_quality_level_properties: *mut vk::VideoEncodeQualityLevelPropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_video_encode_quality_level_properties_khr(
self,
physical_device,
p_quality_level_info,
p_quality_level_properties,
)
}
}
}
/// Call `vkCreateVideoSessionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateVideoSessionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_video_session_khr(
device: &Device,
p_create_info: *const vk::VideoSessionCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_video_session: *mut vk::VideoSessionKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_video_session_khr
.ok_or(CallError::MissingCommand("vkCreateVideoSessionKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_video_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateVideoSessionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateVideoSessionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_video_session_khr(
&self,
p_create_info: *const vk::VideoSessionCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_video_session: *mut vk::VideoSessionKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_video_session_khr(self, p_create_info, p_allocator, p_video_session) }
}
}
/// Call `vkDestroyVideoSessionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyVideoSessionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_video_session_khr(
device: &Device,
video_session: vk::VideoSessionKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_video_session_khr
.ok_or(CallError::MissingCommand("vkDestroyVideoSessionKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), video_session, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyVideoSessionKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyVideoSessionKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_video_session_khr(
&self,
video_session: vk::VideoSessionKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_video_session_khr(self, video_session, p_allocator) }
}
}
/// Call `vkCreateVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_video_session_parameters_khr(
device: &Device,
p_create_info: *const vk::VideoSessionParametersCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_video_session_parameters: *mut vk::VideoSessionParametersKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_video_session_parameters_khr
.ok_or(CallError::MissingCommand(
"vkCreateVideoSessionParametersKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_video_session_parameters,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_video_session_parameters_khr(
&self,
p_create_info: *const vk::VideoSessionParametersCreateInfoKHR,
p_allocator: *const vk::AllocationCallbacks,
p_video_session_parameters: *mut vk::VideoSessionParametersKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_video_session_parameters_khr(
self,
p_create_info,
p_allocator,
p_video_session_parameters,
)
}
}
}
/// Call `vkUpdateVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn update_video_session_parameters_khr(
device: &Device,
video_session_parameters: vk::VideoSessionParametersKHR,
p_update_info: *const vk::VideoSessionParametersUpdateInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.update_video_session_parameters_khr
.ok_or(CallError::MissingCommand(
"vkUpdateVideoSessionParametersKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), video_session_parameters, p_update_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkUpdateVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUpdateVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn update_video_session_parameters_khr(
&self,
video_session_parameters: vk::VideoSessionParametersKHR,
p_update_info: *const vk::VideoSessionParametersUpdateInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { update_video_session_parameters_khr(self, video_session_parameters, p_update_info) }
}
}
/// Call `vkGetEncodedVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetEncodedVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_encoded_video_session_parameters_khr(
device: &Device,
p_video_session_parameters_info: *const vk::VideoEncodeSessionParametersGetInfoKHR,
p_feedback_info: *mut vk::VideoEncodeSessionParametersFeedbackInfoKHR,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_encoded_video_session_parameters_khr
.ok_or(CallError::MissingCommand(
"vkGetEncodedVideoSessionParametersKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_video_session_parameters_info,
p_feedback_info,
p_data_size,
p_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetEncodedVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetEncodedVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_encoded_video_session_parameters_khr(
&self,
p_video_session_parameters_info: *const vk::VideoEncodeSessionParametersGetInfoKHR,
p_feedback_info: *mut vk::VideoEncodeSessionParametersFeedbackInfoKHR,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_encoded_video_session_parameters_khr(
self,
p_video_session_parameters_info,
p_feedback_info,
p_data_size,
p_data,
)
}
}
}
/// Call `vkDestroyVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_video_session_parameters_khr(
device: &Device,
video_session_parameters: vk::VideoSessionParametersKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_video_session_parameters_khr
.ok_or(CallError::MissingCommand(
"vkDestroyVideoSessionParametersKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), video_session_parameters, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyVideoSessionParametersKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyVideoSessionParametersKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_video_session_parameters_khr(
&self,
video_session_parameters: vk::VideoSessionParametersKHR,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_video_session_parameters_khr(self, video_session_parameters, p_allocator) }
}
}
/// Call `vkGetVideoSessionMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetVideoSessionMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_video_session_memory_requirements_khr(
device: &Device,
video_session: vk::VideoSessionKHR,
p_memory_requirements_count: *mut u32,
p_memory_requirements: *mut vk::VideoSessionMemoryRequirementsKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_video_session_memory_requirements_khr
.ok_or(CallError::MissingCommand(
"vkGetVideoSessionMemoryRequirementsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
video_session,
p_memory_requirements_count,
p_memory_requirements,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetVideoSessionMemoryRequirementsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetVideoSessionMemoryRequirementsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_video_session_memory_requirements_khr(
&self,
video_session: vk::VideoSessionKHR,
p_memory_requirements_count: *mut u32,
p_memory_requirements: *mut vk::VideoSessionMemoryRequirementsKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_video_session_memory_requirements_khr(
self,
video_session,
p_memory_requirements_count,
p_memory_requirements,
)
}
}
}
/// Call `vkBindVideoSessionMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindVideoSessionMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn bind_video_session_memory_khr(
device: &Device,
video_session: vk::VideoSessionKHR,
bind_session_memory_info_count: u32,
p_bind_session_memory_infos: *const vk::BindVideoSessionMemoryInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.bind_video_session_memory_khr
.ok_or(CallError::MissingCommand("vkBindVideoSessionMemoryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
video_session,
bind_session_memory_info_count,
p_bind_session_memory_infos,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBindVideoSessionMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindVideoSessionMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn bind_video_session_memory_khr(
&self,
video_session: vk::VideoSessionKHR,
bind_session_memory_info_count: u32,
p_bind_session_memory_infos: *const vk::BindVideoSessionMemoryInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
bind_video_session_memory_khr(
self,
video_session,
bind_session_memory_info_count,
p_bind_session_memory_infos,
)
}
}
}
/// Call `vkCmdDecodeVideoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecodeVideoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_decode_video_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_decode_info: *const vk::VideoDecodeInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_decode_video_khr
.ok_or(CallError::MissingCommand("vkCmdDecodeVideoKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_decode_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDecodeVideoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecodeVideoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_decode_video_khr(
&self,
command_buffer: vk::CommandBuffer,
p_decode_info: *const vk::VideoDecodeInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_decode_video_khr(self, command_buffer, p_decode_info) }
}
}
/// Call `vkCmdBeginVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_video_coding_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_begin_info: *const vk::VideoBeginCodingInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_video_coding_khr
.ok_or(CallError::MissingCommand("vkCmdBeginVideoCodingKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_begin_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_video_coding_khr(
&self,
command_buffer: vk::CommandBuffer,
p_begin_info: *const vk::VideoBeginCodingInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_video_coding_khr(self, command_buffer, p_begin_info) }
}
}
/// Call `vkCmdControlVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdControlVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_control_video_coding_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_coding_control_info: *const vk::VideoCodingControlInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_control_video_coding_khr
.ok_or(CallError::MissingCommand("vkCmdControlVideoCodingKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_coding_control_info) };
Ok(())
}
impl Device {
/// Call `vkCmdControlVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdControlVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_control_video_coding_khr(
&self,
command_buffer: vk::CommandBuffer,
p_coding_control_info: *const vk::VideoCodingControlInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_control_video_coding_khr(self, command_buffer, p_coding_control_info) }
}
}
/// Call `vkCmdEndVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_video_coding_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_end_coding_info: *const vk::VideoEndCodingInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_video_coding_khr
.ok_or(CallError::MissingCommand("vkCmdEndVideoCodingKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_end_coding_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndVideoCodingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndVideoCodingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_video_coding_khr(
&self,
command_buffer: vk::CommandBuffer,
p_end_coding_info: *const vk::VideoEndCodingInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_video_coding_khr(self, command_buffer, p_end_coding_info) }
}
}
/// Call `vkCmdEncodeVideoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEncodeVideoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_encode_video_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_encode_info: *const vk::VideoEncodeInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_encode_video_khr
.ok_or(CallError::MissingCommand("vkCmdEncodeVideoKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_encode_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEncodeVideoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEncodeVideoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_encode_video_khr(
&self,
command_buffer: vk::CommandBuffer,
p_encode_info: *const vk::VideoEncodeInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_encode_video_khr(self, command_buffer, p_encode_info) }
}
}
/// Call `vkCmdDecompressMemoryNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_decompress_memory_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
decompress_region_count: u32,
p_decompress_memory_regions: *const vk::DecompressMemoryRegionNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_decompress_memory_nv
.ok_or(CallError::MissingCommand("vkCmdDecompressMemoryNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
decompress_region_count,
p_decompress_memory_regions,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDecompressMemoryNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_decompress_memory_nv(
&self,
command_buffer: vk::CommandBuffer,
decompress_region_count: u32,
p_decompress_memory_regions: *const vk::DecompressMemoryRegionNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_decompress_memory_nv(
self,
command_buffer,
decompress_region_count,
p_decompress_memory_regions,
)
}
}
}
/// Call `vkCmdDecompressMemoryIndirectCountNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryIndirectCountNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_decompress_memory_indirect_count_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
indirect_commands_address: vk::DeviceAddress,
indirect_commands_count_address: vk::DeviceAddress,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_decompress_memory_indirect_count_nv
.ok_or(CallError::MissingCommand(
"vkCmdDecompressMemoryIndirectCountNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
indirect_commands_address,
indirect_commands_count_address,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDecompressMemoryIndirectCountNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryIndirectCountNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_decompress_memory_indirect_count_nv(
&self,
command_buffer: vk::CommandBuffer,
indirect_commands_address: vk::DeviceAddress,
indirect_commands_count_address: vk::DeviceAddress,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_decompress_memory_indirect_count_nv(
self,
command_buffer,
indirect_commands_address,
indirect_commands_count_address,
stride,
)
}
}
}
/// Call `vkGetPartitionedAccelerationStructuresBuildSizesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPartitionedAccelerationStructuresBuildSizesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_partitioned_acceleration_structures_build_sizes_nv(
device: &Device,
p_info: *const vk::PartitionedAccelerationStructureInstancesInputNV,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_partitioned_acceleration_structures_build_sizes_nv
.ok_or(CallError::MissingCommand(
"vkGetPartitionedAccelerationStructuresBuildSizesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_size_info) };
Ok(())
}
impl Device {
/// Call `vkGetPartitionedAccelerationStructuresBuildSizesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPartitionedAccelerationStructuresBuildSizesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_partitioned_acceleration_structures_build_sizes_nv(
&self,
p_info: *const vk::PartitionedAccelerationStructureInstancesInputNV,
p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_partitioned_acceleration_structures_build_sizes_nv(self, p_info, p_size_info) }
}
}
/// Call `vkCmdBuildPartitionedAccelerationStructuresNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildPartitionedAccelerationStructuresNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_build_partitioned_acceleration_structures_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_build_info: *const vk::BuildPartitionedAccelerationStructureInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_build_partitioned_acceleration_structures_nv
.ok_or(CallError::MissingCommand(
"vkCmdBuildPartitionedAccelerationStructuresNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_build_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBuildPartitionedAccelerationStructuresNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildPartitionedAccelerationStructuresNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_build_partitioned_acceleration_structures_nv(
&self,
command_buffer: vk::CommandBuffer,
p_build_info: *const vk::BuildPartitionedAccelerationStructureInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_build_partitioned_acceleration_structures_nv(self, command_buffer, p_build_info) }
}
}
/// Call `vkCmdDecompressMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_decompress_memory_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_decompress_memory_info_ext: *const vk::DecompressMemoryInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_decompress_memory_ext
.ok_or(CallError::MissingCommand("vkCmdDecompressMemoryEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_decompress_memory_info_ext) };
Ok(())
}
impl Device {
/// Call `vkCmdDecompressMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_decompress_memory_ext(
&self,
command_buffer: vk::CommandBuffer,
p_decompress_memory_info_ext: *const vk::DecompressMemoryInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_decompress_memory_ext(self, command_buffer, p_decompress_memory_info_ext) }
}
}
/// Call `vkCmdDecompressMemoryIndirectCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryIndirectCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_decompress_memory_indirect_count_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
decompression_method: vk::MemoryDecompressionMethodFlagsEXT,
indirect_commands_address: vk::DeviceAddress,
indirect_commands_count_address: vk::DeviceAddress,
max_decompression_count: u32,
stride: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_decompress_memory_indirect_count_ext
.ok_or(CallError::MissingCommand(
"vkCmdDecompressMemoryIndirectCountEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
decompression_method,
indirect_commands_address,
indirect_commands_count_address,
max_decompression_count,
stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDecompressMemoryIndirectCountEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDecompressMemoryIndirectCountEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_decompress_memory_indirect_count_ext(
&self,
command_buffer: vk::CommandBuffer,
decompression_method: vk::MemoryDecompressionMethodFlagsEXT,
indirect_commands_address: vk::DeviceAddress,
indirect_commands_count_address: vk::DeviceAddress,
max_decompression_count: u32,
stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_decompress_memory_indirect_count_ext(
self,
command_buffer,
decompression_method,
indirect_commands_address,
indirect_commands_count_address,
max_decompression_count,
stride,
)
}
}
}
/// Call `vkCreateCuModuleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCuModuleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_cu_module_nvx(
device: &Device,
p_create_info: *const vk::CuModuleCreateInfoNVX,
p_allocator: *const vk::AllocationCallbacks,
p_module: *mut vk::CuModuleNVX,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_cu_module_nvx
.ok_or(CallError::MissingCommand("vkCreateCuModuleNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_module) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateCuModuleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCuModuleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_cu_module_nvx(
&self,
p_create_info: *const vk::CuModuleCreateInfoNVX,
p_allocator: *const vk::AllocationCallbacks,
p_module: *mut vk::CuModuleNVX,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_cu_module_nvx(self, p_create_info, p_allocator, p_module) }
}
}
/// Call `vkCreateCuFunctionNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCuFunctionNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_cu_function_nvx(
device: &Device,
p_create_info: *const vk::CuFunctionCreateInfoNVX,
p_allocator: *const vk::AllocationCallbacks,
p_function: *mut vk::CuFunctionNVX,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_cu_function_nvx
.ok_or(CallError::MissingCommand("vkCreateCuFunctionNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_function) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateCuFunctionNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCuFunctionNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_cu_function_nvx(
&self,
p_create_info: *const vk::CuFunctionCreateInfoNVX,
p_allocator: *const vk::AllocationCallbacks,
p_function: *mut vk::CuFunctionNVX,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_cu_function_nvx(self, p_create_info, p_allocator, p_function) }
}
}
/// Call `vkDestroyCuModuleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCuModuleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_cu_module_nvx(
device: &Device,
module: vk::CuModuleNVX,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_cu_module_nvx
.ok_or(CallError::MissingCommand("vkDestroyCuModuleNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), module, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyCuModuleNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCuModuleNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_cu_module_nvx(
&self,
module: vk::CuModuleNVX,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_cu_module_nvx(self, module, p_allocator) }
}
}
/// Call `vkDestroyCuFunctionNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCuFunctionNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_cu_function_nvx(
device: &Device,
function: vk::CuFunctionNVX,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_cu_function_nvx
.ok_or(CallError::MissingCommand("vkDestroyCuFunctionNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), function, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyCuFunctionNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCuFunctionNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_cu_function_nvx(
&self,
function: vk::CuFunctionNVX,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_cu_function_nvx(self, function, p_allocator) }
}
}
/// Call `vkCmdCuLaunchKernelNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCuLaunchKernelNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_cu_launch_kernel_nvx(
device: &Device,
command_buffer: vk::CommandBuffer,
p_launch_info: *const vk::CuLaunchInfoNVX,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_cu_launch_kernel_nvx
.ok_or(CallError::MissingCommand("vkCmdCuLaunchKernelNVX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_launch_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCuLaunchKernelNVX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCuLaunchKernelNVX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_cu_launch_kernel_nvx(
&self,
command_buffer: vk::CommandBuffer,
p_launch_info: *const vk::CuLaunchInfoNVX,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_cu_launch_kernel_nvx(self, command_buffer, p_launch_info) }
}
}
/// Call `vkGetDescriptorSetLayoutSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_descriptor_set_layout_size_ext(
device: &Device,
layout: vk::DescriptorSetLayout,
p_layout_size_in_bytes: *mut vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_descriptor_set_layout_size_ext
.ok_or(CallError::MissingCommand("vkGetDescriptorSetLayoutSizeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), layout, p_layout_size_in_bytes) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetLayoutSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_descriptor_set_layout_size_ext(
&self,
layout: vk::DescriptorSetLayout,
p_layout_size_in_bytes: *mut vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_set_layout_size_ext(self, layout, p_layout_size_in_bytes) }
}
}
/// Call `vkGetDescriptorSetLayoutBindingOffsetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutBindingOffsetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_descriptor_set_layout_binding_offset_ext(
device: &Device,
layout: vk::DescriptorSetLayout,
binding: u32,
p_offset: *mut vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_descriptor_set_layout_binding_offset_ext
.ok_or(CallError::MissingCommand(
"vkGetDescriptorSetLayoutBindingOffsetEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), layout, binding, p_offset) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetLayoutBindingOffsetEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutBindingOffsetEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_descriptor_set_layout_binding_offset_ext(
&self,
layout: vk::DescriptorSetLayout,
binding: u32,
p_offset: *mut vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_set_layout_binding_offset_ext(self, layout, binding, p_offset) }
}
}
/// Call `vkGetDescriptorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_descriptor_ext(
device: &Device,
p_descriptor_info: *const vk::DescriptorGetInfoEXT,
data_size: usize,
p_descriptor: *mut std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_descriptor_ext
.ok_or(CallError::MissingCommand("vkGetDescriptorEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_descriptor_info, data_size, p_descriptor) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_descriptor_ext(
&self,
p_descriptor_info: *const vk::DescriptorGetInfoEXT,
data_size: usize,
p_descriptor: *mut std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_ext(self, p_descriptor_info, data_size, p_descriptor) }
}
}
/// Call `vkCmdBindDescriptorBuffersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBuffersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_descriptor_buffers_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
buffer_count: u32,
p_binding_infos: *const vk::DescriptorBufferBindingInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_buffers_ext
.ok_or(CallError::MissingCommand("vkCmdBindDescriptorBuffersEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, buffer_count, p_binding_infos) };
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorBuffersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBuffersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_descriptor_buffers_ext(
&self,
command_buffer: vk::CommandBuffer,
buffer_count: u32,
p_binding_infos: *const vk::DescriptorBufferBindingInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_descriptor_buffers_ext(self, command_buffer, buffer_count, p_binding_infos) }
}
}
/// Call `vkCmdSetDescriptorBufferOffsetsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDescriptorBufferOffsetsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_set_descriptor_buffer_offsets_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
first_set: u32,
set_count: u32,
p_buffer_indices: *const u32,
p_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_descriptor_buffer_offsets_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetDescriptorBufferOffsetsEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
pipeline_bind_point,
layout,
first_set,
set_count,
p_buffer_indices,
p_offsets,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdSetDescriptorBufferOffsetsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDescriptorBufferOffsetsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_set_descriptor_buffer_offsets_ext(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
first_set: u32,
set_count: u32,
p_buffer_indices: *const u32,
p_offsets: *const vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_descriptor_buffer_offsets_ext(
self,
command_buffer,
pipeline_bind_point,
layout,
first_set,
set_count,
p_buffer_indices,
p_offsets,
)
}
}
}
/// Call `vkCmdBindDescriptorBufferEmbeddedSamplersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBufferEmbeddedSamplersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_descriptor_buffer_embedded_samplers_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_buffer_embedded_samplers_ext
.ok_or(CallError::MissingCommand(
"vkCmdBindDescriptorBufferEmbeddedSamplersEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, pipeline_bind_point, layout, set) };
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorBufferEmbeddedSamplersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBufferEmbeddedSamplersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_descriptor_buffer_embedded_samplers_ext(
&self,
command_buffer: vk::CommandBuffer,
pipeline_bind_point: vk::PipelineBindPoint,
layout: vk::PipelineLayout,
set: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_descriptor_buffer_embedded_samplers_ext(
self,
command_buffer,
pipeline_bind_point,
layout,
set,
)
}
}
}
/// Call `vkGetBufferOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_buffer_opaque_capture_descriptor_data_ext(
device: &Device,
p_info: *const vk::BufferCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_buffer_opaque_capture_descriptor_data_ext
.ok_or(CallError::MissingCommand(
"vkGetBufferOpaqueCaptureDescriptorDataEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetBufferOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_buffer_opaque_capture_descriptor_data_ext(
&self,
p_info: *const vk::BufferCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_opaque_capture_descriptor_data_ext(self, p_info, p_data) }
}
}
/// Call `vkGetImageOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_opaque_capture_descriptor_data_ext(
device: &Device,
p_info: *const vk::ImageCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_image_opaque_capture_descriptor_data_ext
.ok_or(CallError::MissingCommand(
"vkGetImageOpaqueCaptureDescriptorDataEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetImageOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_opaque_capture_descriptor_data_ext(
&self,
p_info: *const vk::ImageCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_opaque_capture_descriptor_data_ext(self, p_info, p_data) }
}
}
/// Call `vkGetImageViewOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_view_opaque_capture_descriptor_data_ext(
device: &Device,
p_info: *const vk::ImageViewCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_image_view_opaque_capture_descriptor_data_ext
.ok_or(CallError::MissingCommand(
"vkGetImageViewOpaqueCaptureDescriptorDataEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetImageViewOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageViewOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_view_opaque_capture_descriptor_data_ext(
&self,
p_info: *const vk::ImageViewCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_view_opaque_capture_descriptor_data_ext(self, p_info, p_data) }
}
}
/// Call `vkGetSamplerOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSamplerOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_sampler_opaque_capture_descriptor_data_ext(
device: &Device,
p_info: *const vk::SamplerCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_sampler_opaque_capture_descriptor_data_ext
.ok_or(CallError::MissingCommand(
"vkGetSamplerOpaqueCaptureDescriptorDataEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSamplerOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSamplerOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_sampler_opaque_capture_descriptor_data_ext(
&self,
p_info: *const vk::SamplerCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_sampler_opaque_capture_descriptor_data_ext(self, p_info, p_data) }
}
}
/// Call `vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_acceleration_structure_opaque_capture_descriptor_data_ext(
device: &Device,
p_info: *const vk::AccelerationStructureCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_acceleration_structure_opaque_capture_descriptor_data_ext
.ok_or(CallError::MissingCommand(
"vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_acceleration_structure_opaque_capture_descriptor_data_ext(
&self,
p_info: *const vk::AccelerationStructureCaptureDescriptorDataInfoEXT,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_acceleration_structure_opaque_capture_descriptor_data_ext(self, p_info, p_data) }
}
}
/// Call `vkSetDeviceMemoryPriorityEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDeviceMemoryPriorityEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_device_memory_priority_ext(
device: &Device,
memory: vk::DeviceMemory,
priority: f32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_device_memory_priority_ext
.ok_or(CallError::MissingCommand("vkSetDeviceMemoryPriorityEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), memory, priority) };
Ok(())
}
impl Device {
/// Call `vkSetDeviceMemoryPriorityEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetDeviceMemoryPriorityEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_device_memory_priority_ext(
&self,
memory: vk::DeviceMemory,
priority: f32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_device_memory_priority_ext(self, memory, priority) }
}
}
/// Call `vkAcquireDrmDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireDrmDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn acquire_drm_display_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
drm_fd: i32,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.acquire_drm_display_ext
.ok_or(CallError::MissingCommand("vkAcquireDrmDisplayEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, drm_fd, display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkAcquireDrmDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkAcquireDrmDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn acquire_drm_display_ext(
&self,
physical_device: vk::PhysicalDevice,
drm_fd: i32,
display: vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { acquire_drm_display_ext(self, physical_device, drm_fd, display) }
}
}
/// Call `vkGetDrmDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDrmDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_drm_display_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
drm_fd: i32,
connector_id: u32,
display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_drm_display_ext
.ok_or(CallError::MissingCommand("vkGetDrmDisplayEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, drm_fd, connector_id, display) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetDrmDisplayEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDrmDisplayEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_drm_display_ext(
&self,
physical_device: vk::PhysicalDevice,
drm_fd: i32,
connector_id: u32,
display: *mut vk::DisplayKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_drm_display_ext(self, physical_device, drm_fd, connector_id, display) }
}
}
/// Call `vkWaitForPresent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitForPresent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn wait_for_present2_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
p_present_wait2_info: *const vk::PresentWait2InfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.wait_for_present2_khr
.ok_or(CallError::MissingCommand("vkWaitForPresent2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, p_present_wait2_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWaitForPresent2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitForPresent2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn wait_for_present2_khr(
&self,
swapchain: vk::SwapchainKHR,
p_present_wait2_info: *const vk::PresentWait2InfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { wait_for_present2_khr(self, swapchain, p_present_wait2_info) }
}
}
/// Call `vkWaitForPresentKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitForPresentKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn wait_for_present_khr(
device: &Device,
swapchain: vk::SwapchainKHR,
present_id: u64,
timeout: u64,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.wait_for_present_khr
.ok_or(CallError::MissingCommand("vkWaitForPresentKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, present_id, timeout) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWaitForPresentKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWaitForPresentKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn wait_for_present_khr(
&self,
swapchain: vk::SwapchainKHR,
present_id: u64,
timeout: u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { wait_for_present_khr(self, swapchain, present_id, timeout) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkCreateBufferCollectionFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateBufferCollectionFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_buffer_collection_fuchsia(
device: &Device,
p_create_info: *const vk::BufferCollectionCreateInfoFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
p_collection: *mut vk::BufferCollectionFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_buffer_collection_fuchsia
.ok_or(CallError::MissingCommand("vkCreateBufferCollectionFUCHSIA"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_collection) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkCreateBufferCollectionFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateBufferCollectionFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_buffer_collection_fuchsia(
&self,
p_create_info: *const vk::BufferCollectionCreateInfoFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
p_collection: *mut vk::BufferCollectionFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_buffer_collection_fuchsia(self, p_create_info, p_allocator, p_collection) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkSetBufferCollectionBufferConstraintsFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetBufferCollectionBufferConstraintsFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_buffer_collection_buffer_constraints_fuchsia(
device: &Device,
collection: vk::BufferCollectionFUCHSIA,
p_buffer_constraints_info: *const vk::BufferConstraintsInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_buffer_collection_buffer_constraints_fuchsia
.ok_or(CallError::MissingCommand(
"vkSetBufferCollectionBufferConstraintsFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), collection, p_buffer_constraints_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkSetBufferCollectionBufferConstraintsFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetBufferCollectionBufferConstraintsFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_buffer_collection_buffer_constraints_fuchsia(
&self,
collection: vk::BufferCollectionFUCHSIA,
p_buffer_constraints_info: *const vk::BufferConstraintsInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
set_buffer_collection_buffer_constraints_fuchsia(self, collection, p_buffer_constraints_info)
}
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkSetBufferCollectionImageConstraintsFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetBufferCollectionImageConstraintsFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_buffer_collection_image_constraints_fuchsia(
device: &Device,
collection: vk::BufferCollectionFUCHSIA,
p_image_constraints_info: *const vk::ImageConstraintsInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_buffer_collection_image_constraints_fuchsia
.ok_or(CallError::MissingCommand(
"vkSetBufferCollectionImageConstraintsFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), collection, p_image_constraints_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkSetBufferCollectionImageConstraintsFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetBufferCollectionImageConstraintsFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_buffer_collection_image_constraints_fuchsia(
&self,
collection: vk::BufferCollectionFUCHSIA,
p_image_constraints_info: *const vk::ImageConstraintsInfoFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
set_buffer_collection_image_constraints_fuchsia(self, collection, p_image_constraints_info)
}
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkDestroyBufferCollectionFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyBufferCollectionFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_buffer_collection_fuchsia(
device: &Device,
collection: vk::BufferCollectionFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_buffer_collection_fuchsia
.ok_or(CallError::MissingCommand(
"vkDestroyBufferCollectionFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), collection, p_allocator) };
Ok(())
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkDestroyBufferCollectionFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyBufferCollectionFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_buffer_collection_fuchsia(
&self,
collection: vk::BufferCollectionFUCHSIA,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_buffer_collection_fuchsia(self, collection, p_allocator) }
}
}
#[cfg(feature = "platform-fuchsia")]
/// Call `vkGetBufferCollectionPropertiesFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferCollectionPropertiesFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_buffer_collection_properties_fuchsia(
device: &Device,
collection: vk::BufferCollectionFUCHSIA,
p_properties: *mut vk::BufferCollectionPropertiesFUCHSIA,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_buffer_collection_properties_fuchsia
.ok_or(CallError::MissingCommand(
"vkGetBufferCollectionPropertiesFUCHSIA",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), collection, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-fuchsia")]
impl Device {
/// Call `vkGetBufferCollectionPropertiesFUCHSIA` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetBufferCollectionPropertiesFUCHSIA` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_buffer_collection_properties_fuchsia(
&self,
collection: vk::BufferCollectionFUCHSIA,
p_properties: *mut vk::BufferCollectionPropertiesFUCHSIA,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_buffer_collection_properties_fuchsia(self, collection, p_properties) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkCreateCudaModuleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCudaModuleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_cuda_module_nv(
device: &Device,
p_create_info: *const vk::CudaModuleCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_module: *mut vk::CudaModuleNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_cuda_module_nv
.ok_or(CallError::MissingCommand("vkCreateCudaModuleNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_module) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCreateCudaModuleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCudaModuleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_cuda_module_nv(
&self,
p_create_info: *const vk::CudaModuleCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_module: *mut vk::CudaModuleNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_cuda_module_nv(self, p_create_info, p_allocator, p_module) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkGetCudaModuleCacheNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCudaModuleCacheNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_cuda_module_cache_nv(
device: &Device,
module: vk::CudaModuleNV,
p_cache_size: *mut usize,
p_cache_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_cuda_module_cache_nv
.ok_or(CallError::MissingCommand("vkGetCudaModuleCacheNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), module, p_cache_size, p_cache_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkGetCudaModuleCacheNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetCudaModuleCacheNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_cuda_module_cache_nv(
&self,
module: vk::CudaModuleNV,
p_cache_size: *mut usize,
p_cache_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_cuda_module_cache_nv(self, module, p_cache_size, p_cache_data) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkCreateCudaFunctionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCudaFunctionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_cuda_function_nv(
device: &Device,
p_create_info: *const vk::CudaFunctionCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_function: *mut vk::CudaFunctionNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_cuda_function_nv
.ok_or(CallError::MissingCommand("vkCreateCudaFunctionNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_function) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCreateCudaFunctionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateCudaFunctionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_cuda_function_nv(
&self,
p_create_info: *const vk::CudaFunctionCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_function: *mut vk::CudaFunctionNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_cuda_function_nv(self, p_create_info, p_allocator, p_function) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkDestroyCudaModuleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCudaModuleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_cuda_module_nv(
device: &Device,
module: vk::CudaModuleNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_cuda_module_nv
.ok_or(CallError::MissingCommand("vkDestroyCudaModuleNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), module, p_allocator) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkDestroyCudaModuleNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCudaModuleNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_cuda_module_nv(
&self,
module: vk::CudaModuleNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_cuda_module_nv(self, module, p_allocator) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkDestroyCudaFunctionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCudaFunctionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_cuda_function_nv(
device: &Device,
function: vk::CudaFunctionNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_cuda_function_nv
.ok_or(CallError::MissingCommand("vkDestroyCudaFunctionNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), function, p_allocator) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkDestroyCudaFunctionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyCudaFunctionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_cuda_function_nv(
&self,
function: vk::CudaFunctionNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_cuda_function_nv(self, function, p_allocator) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkCmdCudaLaunchKernelNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCudaLaunchKernelNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_cuda_launch_kernel_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_launch_info: *const vk::CudaLaunchInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_cuda_launch_kernel_nv
.ok_or(CallError::MissingCommand("vkCmdCudaLaunchKernelNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_launch_info) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCmdCudaLaunchKernelNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCudaLaunchKernelNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_cuda_launch_kernel_nv(
&self,
command_buffer: vk::CommandBuffer,
p_launch_info: *const vk::CudaLaunchInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_cuda_launch_kernel_nv(self, command_buffer, p_launch_info) }
}
}
/// Call `vkCmdBeginRendering` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRendering` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_rendering(
device: &Device,
command_buffer: vk::CommandBuffer,
p_rendering_info: *const vk::RenderingInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_rendering
.ok_or(CallError::MissingCommand("vkCmdBeginRendering"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_rendering_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginRendering` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRendering` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_rendering(
&self,
command_buffer: vk::CommandBuffer,
p_rendering_info: *const vk::RenderingInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_rendering(self, command_buffer, p_rendering_info) }
}
}
/// Call `vkCmdBeginRenderingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_rendering_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_rendering_info: *const vk::RenderingInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_rendering_khr
.ok_or(CallError::MissingCommand("vkCmdBeginRenderingKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_rendering_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginRenderingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginRenderingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_rendering_khr(
&self,
command_buffer: vk::CommandBuffer,
p_rendering_info: *const vk::RenderingInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_rendering_khr(self, command_buffer, p_rendering_info) }
}
}
/// Call `vkCmdEndRendering` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_rendering(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_rendering
.ok_or(CallError::MissingCommand("vkCmdEndRendering"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRendering` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_rendering(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_rendering(self, command_buffer) }
}
}
/// Call `vkCmdEndRendering2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_rendering2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_rendering_end_info: *const vk::RenderingEndInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_rendering2_khr
.ok_or(CallError::MissingCommand("vkCmdEndRendering2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_rendering_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRendering2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_rendering2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_rendering_end_info: *const vk::RenderingEndInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_rendering2_khr(self, command_buffer, p_rendering_end_info) }
}
}
/// Call `vkCmdEndRendering2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_rendering2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_rendering_end_info: *const vk::RenderingEndInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_rendering2_ext
.ok_or(CallError::MissingCommand("vkCmdEndRendering2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_rendering_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRendering2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRendering2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_rendering2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_rendering_end_info: *const vk::RenderingEndInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_rendering2_ext(self, command_buffer, p_rendering_end_info) }
}
}
/// Call `vkCmdEndRenderingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_rendering_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_rendering_khr
.ok_or(CallError::MissingCommand("vkCmdEndRenderingKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndRenderingKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndRenderingKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_rendering_khr(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_rendering_khr(self, command_buffer) }
}
}
/// Call `vkGetDescriptorSetLayoutHostMappingInfoVALVE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutHostMappingInfoVALVE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_descriptor_set_layout_host_mapping_info_valve(
device: &Device,
p_binding_reference: *const vk::DescriptorSetBindingReferenceVALVE,
p_host_mapping: *mut vk::DescriptorSetLayoutHostMappingInfoVALVE,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_descriptor_set_layout_host_mapping_info_valve
.ok_or(CallError::MissingCommand(
"vkGetDescriptorSetLayoutHostMappingInfoVALVE",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_binding_reference, p_host_mapping) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetLayoutHostMappingInfoVALVE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetLayoutHostMappingInfoVALVE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_descriptor_set_layout_host_mapping_info_valve(
&self,
p_binding_reference: *const vk::DescriptorSetBindingReferenceVALVE,
p_host_mapping: *mut vk::DescriptorSetLayoutHostMappingInfoVALVE,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_descriptor_set_layout_host_mapping_info_valve(self, p_binding_reference, p_host_mapping)
}
}
}
/// Call `vkGetDescriptorSetHostMappingVALVE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetHostMappingVALVE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_descriptor_set_host_mapping_valve(
device: &Device,
descriptor_set: vk::DescriptorSet,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_descriptor_set_host_mapping_valve
.ok_or(CallError::MissingCommand(
"vkGetDescriptorSetHostMappingVALVE",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), descriptor_set, pp_data) };
Ok(())
}
impl Device {
/// Call `vkGetDescriptorSetHostMappingVALVE` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDescriptorSetHostMappingVALVE` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_descriptor_set_host_mapping_valve(
&self,
descriptor_set: vk::DescriptorSet,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_descriptor_set_host_mapping_valve(self, descriptor_set, pp_data) }
}
}
/// Call `vkCreateMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_micromap_ext(
device: &Device,
p_create_info: *const vk::MicromapCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_micromap: *mut vk::MicromapEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_micromap_ext
.ok_or(CallError::MissingCommand("vkCreateMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_micromap) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_micromap_ext(
&self,
p_create_info: *const vk::MicromapCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_micromap: *mut vk::MicromapEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_micromap_ext(self, p_create_info, p_allocator, p_micromap) }
}
}
/// Call `vkCmdBuildMicromapsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildMicromapsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_build_micromaps_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::MicromapBuildInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_build_micromaps_ext
.ok_or(CallError::MissingCommand("vkCmdBuildMicromapsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, info_count, p_infos) };
Ok(())
}
impl Device {
/// Call `vkCmdBuildMicromapsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBuildMicromapsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_build_micromaps_ext(
&self,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::MicromapBuildInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_build_micromaps_ext(self, command_buffer, info_count, p_infos) }
}
}
/// Call `vkBuildMicromapsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBuildMicromapsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn build_micromaps_ext(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
info_count: u32,
p_infos: *const vk::MicromapBuildInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.build_micromaps_ext
.ok_or(CallError::MissingCommand("vkBuildMicromapsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, info_count, p_infos) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBuildMicromapsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBuildMicromapsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn build_micromaps_ext(
&self,
deferred_operation: vk::DeferredOperationKHR,
info_count: u32,
p_infos: *const vk::MicromapBuildInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { build_micromaps_ext(self, deferred_operation, info_count, p_infos) }
}
}
/// Call `vkDestroyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_micromap_ext(
device: &Device,
micromap: vk::MicromapEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_micromap_ext
.ok_or(CallError::MissingCommand("vkDestroyMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), micromap, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_micromap_ext(
&self,
micromap: vk::MicromapEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_micromap_ext(self, micromap, p_allocator) }
}
}
/// Call `vkCmdCopyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_micromap_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMicromapInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_micromap_ext
.ok_or(CallError::MissingCommand("vkCmdCopyMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_micromap_ext(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMicromapInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_micromap_ext(self, command_buffer, p_info) }
}
}
/// Call `vkCopyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_micromap_ext(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMicromapInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_micromap_ext
.ok_or(CallError::MissingCommand("vkCopyMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_micromap_ext(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMicromapInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_micromap_ext(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdCopyMicromapToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMicromapToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_micromap_to_memory_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMicromapToMemoryInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_micromap_to_memory_ext
.ok_or(CallError::MissingCommand("vkCmdCopyMicromapToMemoryEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMicromapToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMicromapToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_micromap_to_memory_ext(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMicromapToMemoryInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_micromap_to_memory_ext(self, command_buffer, p_info) }
}
}
/// Call `vkCopyMicromapToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMicromapToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_micromap_to_memory_ext(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMicromapToMemoryInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_micromap_to_memory_ext
.ok_or(CallError::MissingCommand("vkCopyMicromapToMemoryEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMicromapToMemoryEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMicromapToMemoryEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_micromap_to_memory_ext(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMicromapToMemoryInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_micromap_to_memory_ext(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdCopyMemoryToMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_to_micromap_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMemoryToMicromapInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_to_micromap_ext
.ok_or(CallError::MissingCommand("vkCmdCopyMemoryToMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryToMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_to_micromap_ext(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::CopyMemoryToMicromapInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_memory_to_micromap_ext(self, command_buffer, p_info) }
}
}
/// Call `vkCopyMemoryToMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn copy_memory_to_micromap_ext(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMemoryToMicromapInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.copy_memory_to_micromap_ext
.ok_or(CallError::MissingCommand("vkCopyMemoryToMicromapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), deferred_operation, p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCopyMemoryToMicromapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCopyMemoryToMicromapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn copy_memory_to_micromap_ext(
&self,
deferred_operation: vk::DeferredOperationKHR,
p_info: *const vk::CopyMemoryToMicromapInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { copy_memory_to_micromap_ext(self, deferred_operation, p_info) }
}
}
/// Call `vkCmdWriteMicromapsPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteMicromapsPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_micromaps_properties_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
micromap_count: u32,
p_micromaps: *const vk::MicromapEXT,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_write_micromaps_properties_ext
.ok_or(CallError::MissingCommand(
"vkCmdWriteMicromapsPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
micromap_count,
p_micromaps,
query_type,
query_pool,
first_query,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdWriteMicromapsPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteMicromapsPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_micromaps_properties_ext(
&self,
command_buffer: vk::CommandBuffer,
micromap_count: u32,
p_micromaps: *const vk::MicromapEXT,
query_type: vk::QueryType,
query_pool: vk::QueryPool,
first_query: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_write_micromaps_properties_ext(
self,
command_buffer,
micromap_count,
p_micromaps,
query_type,
query_pool,
first_query,
)
}
}
}
/// Call `vkWriteMicromapsPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteMicromapsPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn write_micromaps_properties_ext(
device: &Device,
micromap_count: u32,
p_micromaps: *const vk::MicromapEXT,
query_type: vk::QueryType,
data_size: usize,
p_data: *mut std::ffi::c_void,
stride: usize,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.write_micromaps_properties_ext
.ok_or(CallError::MissingCommand("vkWriteMicromapsPropertiesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
micromap_count,
p_micromaps,
query_type,
data_size,
p_data,
stride,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWriteMicromapsPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteMicromapsPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn write_micromaps_properties_ext(
&self,
micromap_count: u32,
p_micromaps: *const vk::MicromapEXT,
query_type: vk::QueryType,
data_size: usize,
p_data: *mut std::ffi::c_void,
stride: usize,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
write_micromaps_properties_ext(
self,
micromap_count,
p_micromaps,
query_type,
data_size,
p_data,
stride,
)
}
}
}
/// Call `vkGetDeviceMicromapCompatibilityEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMicromapCompatibilityEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_micromap_compatibility_ext(
device: &Device,
p_version_info: *const vk::MicromapVersionInfoEXT,
p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_micromap_compatibility_ext
.ok_or(CallError::MissingCommand(
"vkGetDeviceMicromapCompatibilityEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_version_info, p_compatibility) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceMicromapCompatibilityEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceMicromapCompatibilityEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_micromap_compatibility_ext(
&self,
p_version_info: *const vk::MicromapVersionInfoEXT,
p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_micromap_compatibility_ext(self, p_version_info, p_compatibility) }
}
}
/// Call `vkGetMicromapBuildSizesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMicromapBuildSizesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_micromap_build_sizes_ext(
device: &Device,
build_type: vk::AccelerationStructureBuildTypeKHR,
p_build_info: *const vk::MicromapBuildInfoEXT,
p_size_info: *mut vk::MicromapBuildSizesInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_micromap_build_sizes_ext
.ok_or(CallError::MissingCommand("vkGetMicromapBuildSizesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), build_type, p_build_info, p_size_info) };
Ok(())
}
impl Device {
/// Call `vkGetMicromapBuildSizesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMicromapBuildSizesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_micromap_build_sizes_ext(
&self,
build_type: vk::AccelerationStructureBuildTypeKHR,
p_build_info: *const vk::MicromapBuildInfoEXT,
p_size_info: *mut vk::MicromapBuildSizesInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_micromap_build_sizes_ext(self, build_type, p_build_info, p_size_info) }
}
}
/// Call `vkGetShaderModuleIdentifierEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderModuleIdentifierEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_shader_module_identifier_ext(
device: &Device,
shader_module: vk::ShaderModule,
p_identifier: *mut vk::ShaderModuleIdentifierEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_shader_module_identifier_ext
.ok_or(CallError::MissingCommand("vkGetShaderModuleIdentifierEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), shader_module, p_identifier) };
Ok(())
}
impl Device {
/// Call `vkGetShaderModuleIdentifierEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderModuleIdentifierEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_shader_module_identifier_ext(
&self,
shader_module: vk::ShaderModule,
p_identifier: *mut vk::ShaderModuleIdentifierEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_shader_module_identifier_ext(self, shader_module, p_identifier) }
}
}
/// Call `vkGetShaderModuleCreateInfoIdentifierEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderModuleCreateInfoIdentifierEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_shader_module_create_info_identifier_ext(
device: &Device,
p_create_info: *const vk::ShaderModuleCreateInfo,
p_identifier: *mut vk::ShaderModuleIdentifierEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_shader_module_create_info_identifier_ext
.ok_or(CallError::MissingCommand(
"vkGetShaderModuleCreateInfoIdentifierEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_create_info, p_identifier) };
Ok(())
}
impl Device {
/// Call `vkGetShaderModuleCreateInfoIdentifierEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderModuleCreateInfoIdentifierEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_shader_module_create_info_identifier_ext(
&self,
p_create_info: *const vk::ShaderModuleCreateInfo,
p_identifier: *mut vk::ShaderModuleIdentifierEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_shader_module_create_info_identifier_ext(self, p_create_info, p_identifier) }
}
}
/// Call `vkGetImageSubresourceLayout2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_subresource_layout2(
device: &Device,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_subresource_layout2
.ok_or(CallError::MissingCommand("vkGetImageSubresourceLayout2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), image, p_subresource, p_layout) };
Ok(())
}
impl Device {
/// Call `vkGetImageSubresourceLayout2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_subresource_layout2(
&self,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_subresource_layout2(self, image, p_subresource, p_layout) }
}
}
/// Call `vkGetImageSubresourceLayout2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_subresource_layout2_khr(
device: &Device,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_subresource_layout2_khr
.ok_or(CallError::MissingCommand("vkGetImageSubresourceLayout2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), image, p_subresource, p_layout) };
Ok(())
}
impl Device {
/// Call `vkGetImageSubresourceLayout2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_subresource_layout2_khr(
&self,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_subresource_layout2_khr(self, image, p_subresource, p_layout) }
}
}
/// Call `vkGetImageSubresourceLayout2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_subresource_layout2_ext(
device: &Device,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_image_subresource_layout2_ext
.ok_or(CallError::MissingCommand("vkGetImageSubresourceLayout2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), image, p_subresource, p_layout) };
Ok(())
}
impl Device {
/// Call `vkGetImageSubresourceLayout2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageSubresourceLayout2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_subresource_layout2_ext(
&self,
image: vk::Image,
p_subresource: *const vk::ImageSubresource2,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_subresource_layout2_ext(self, image, p_subresource, p_layout) }
}
}
/// Call `vkGetPipelinePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelinePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_pipeline_properties_ext(
device: &Device,
p_pipeline_info: *const vk::PipelineInfoKHR,
p_pipeline_properties: *mut vk::BaseOutStructure,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_pipeline_properties_ext
.ok_or(CallError::MissingCommand("vkGetPipelinePropertiesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_pipeline_info, p_pipeline_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPipelinePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPipelinePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_pipeline_properties_ext(
&self,
p_pipeline_info: *const vk::PipelineInfoKHR,
p_pipeline_properties: *mut vk::BaseOutStructure,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_pipeline_properties_ext(self, p_pipeline_info, p_pipeline_properties) }
}
}
#[cfg(feature = "platform-metal")]
/// Call `vkExportMetalObjectsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkExportMetalObjectsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn export_metal_objects_ext(
device: &Device,
p_metal_objects_info: *mut vk::ExportMetalObjectsInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.export_metal_objects_ext
.ok_or(CallError::MissingCommand("vkExportMetalObjectsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_metal_objects_info) };
Ok(())
}
#[cfg(feature = "platform-metal")]
impl Device {
/// Call `vkExportMetalObjectsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkExportMetalObjectsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn export_metal_objects_ext(
&self,
p_metal_objects_info: *mut vk::ExportMetalObjectsInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { export_metal_objects_ext(self, p_metal_objects_info) }
}
}
/// Call `vkCmdBindTileMemoryQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTileMemoryQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_tile_memory_qcom(
device: &Device,
command_buffer: vk::CommandBuffer,
p_tile_memory_bind_info: *const vk::TileMemoryBindInfoQCOM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_tile_memory_qcom
.ok_or(CallError::MissingCommand("vkCmdBindTileMemoryQCOM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_tile_memory_bind_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindTileMemoryQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTileMemoryQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_tile_memory_qcom(
&self,
command_buffer: vk::CommandBuffer,
p_tile_memory_bind_info: *const vk::TileMemoryBindInfoQCOM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_tile_memory_qcom(self, command_buffer, p_tile_memory_bind_info) }
}
}
/// Call `vkGetFramebufferTilePropertiesQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFramebufferTilePropertiesQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_framebuffer_tile_properties_qcom(
device: &Device,
framebuffer: vk::Framebuffer,
p_properties_count: *mut u32,
p_properties: *mut vk::TilePropertiesQCOM,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_framebuffer_tile_properties_qcom
.ok_or(CallError::MissingCommand(
"vkGetFramebufferTilePropertiesQCOM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
framebuffer,
p_properties_count,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetFramebufferTilePropertiesQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetFramebufferTilePropertiesQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_framebuffer_tile_properties_qcom(
&self,
framebuffer: vk::Framebuffer,
p_properties_count: *mut u32,
p_properties: *mut vk::TilePropertiesQCOM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_framebuffer_tile_properties_qcom(self, framebuffer, p_properties_count, p_properties)
}
}
}
/// Call `vkGetDynamicRenderingTilePropertiesQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDynamicRenderingTilePropertiesQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_dynamic_rendering_tile_properties_qcom(
device: &Device,
p_rendering_info: *const vk::RenderingInfo,
p_properties: *mut vk::TilePropertiesQCOM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_dynamic_rendering_tile_properties_qcom
.ok_or(CallError::MissingCommand(
"vkGetDynamicRenderingTilePropertiesQCOM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_rendering_info, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDynamicRenderingTilePropertiesQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDynamicRenderingTilePropertiesQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_dynamic_rendering_tile_properties_qcom(
&self,
p_rendering_info: *const vk::RenderingInfo,
p_properties: *mut vk::TilePropertiesQCOM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_dynamic_rendering_tile_properties_qcom(self, p_rendering_info, p_properties) }
}
}
/// Call `vkGetPhysicalDeviceOpticalFlowImageFormatsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceOpticalFlowImageFormatsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_optical_flow_image_formats_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_optical_flow_image_format_info: *const vk::OpticalFlowImageFormatInfoNV,
p_format_count: *mut u32,
p_image_format_properties: *mut vk::OpticalFlowImageFormatPropertiesNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_optical_flow_image_formats_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceOpticalFlowImageFormatsNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_optical_flow_image_format_info,
p_format_count,
p_image_format_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceOpticalFlowImageFormatsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceOpticalFlowImageFormatsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_optical_flow_image_formats_nv(
&self,
physical_device: vk::PhysicalDevice,
p_optical_flow_image_format_info: *const vk::OpticalFlowImageFormatInfoNV,
p_format_count: *mut u32,
p_image_format_properties: *mut vk::OpticalFlowImageFormatPropertiesNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_optical_flow_image_formats_nv(
self,
physical_device,
p_optical_flow_image_format_info,
p_format_count,
p_image_format_properties,
)
}
}
}
/// Call `vkCreateOpticalFlowSessionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateOpticalFlowSessionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_optical_flow_session_nv(
device: &Device,
p_create_info: *const vk::OpticalFlowSessionCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_session: *mut vk::OpticalFlowSessionNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_optical_flow_session_nv
.ok_or(CallError::MissingCommand("vkCreateOpticalFlowSessionNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateOpticalFlowSessionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateOpticalFlowSessionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_optical_flow_session_nv(
&self,
p_create_info: *const vk::OpticalFlowSessionCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_session: *mut vk::OpticalFlowSessionNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_optical_flow_session_nv(self, p_create_info, p_allocator, p_session) }
}
}
/// Call `vkDestroyOpticalFlowSessionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyOpticalFlowSessionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_optical_flow_session_nv(
device: &Device,
session: vk::OpticalFlowSessionNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_optical_flow_session_nv
.ok_or(CallError::MissingCommand("vkDestroyOpticalFlowSessionNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), session, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyOpticalFlowSessionNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyOpticalFlowSessionNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_optical_flow_session_nv(
&self,
session: vk::OpticalFlowSessionNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_optical_flow_session_nv(self, session, p_allocator) }
}
}
/// Call `vkBindOpticalFlowSessionImageNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindOpticalFlowSessionImageNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn bind_optical_flow_session_image_nv(
device: &Device,
session: vk::OpticalFlowSessionNV,
binding_point: vk::OpticalFlowSessionBindingPointNV,
view: vk::ImageView,
layout: vk::ImageLayout,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.bind_optical_flow_session_image_nv
.ok_or(CallError::MissingCommand("vkBindOpticalFlowSessionImageNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), session, binding_point, view, layout) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBindOpticalFlowSessionImageNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindOpticalFlowSessionImageNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn bind_optical_flow_session_image_nv(
&self,
session: vk::OpticalFlowSessionNV,
binding_point: vk::OpticalFlowSessionBindingPointNV,
view: vk::ImageView,
layout: vk::ImageLayout,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_optical_flow_session_image_nv(self, session, binding_point, view, layout) }
}
}
/// Call `vkCmdOpticalFlowExecuteNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdOpticalFlowExecuteNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_optical_flow_execute_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
session: vk::OpticalFlowSessionNV,
p_execute_info: *const vk::OpticalFlowExecuteInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_optical_flow_execute_nv
.ok_or(CallError::MissingCommand("vkCmdOpticalFlowExecuteNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, session, p_execute_info) };
Ok(())
}
impl Device {
/// Call `vkCmdOpticalFlowExecuteNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdOpticalFlowExecuteNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_optical_flow_execute_nv(
&self,
command_buffer: vk::CommandBuffer,
session: vk::OpticalFlowSessionNV,
p_execute_info: *const vk::OpticalFlowExecuteInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_optical_flow_execute_nv(self, command_buffer, session, p_execute_info) }
}
}
/// Call `vkGetDeviceFaultInfoEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultInfoEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_fault_info_ext(
device: &Device,
p_fault_counts: *mut vk::DeviceFaultCountsEXT,
p_fault_info: *mut vk::DeviceFaultInfoEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_fault_info_ext
.ok_or(CallError::MissingCommand("vkGetDeviceFaultInfoEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_fault_counts, p_fault_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceFaultInfoEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultInfoEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_fault_info_ext(
&self,
p_fault_counts: *mut vk::DeviceFaultCountsEXT,
p_fault_info: *mut vk::DeviceFaultInfoEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_fault_info_ext(self, p_fault_counts, p_fault_info) }
}
}
/// Call `vkGetDeviceFaultReportsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultReportsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_fault_reports_khr(
device: &Device,
timeout: u64,
p_fault_counts: *mut u32,
p_fault_info: *mut vk::DeviceFaultInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_fault_reports_khr
.ok_or(CallError::MissingCommand("vkGetDeviceFaultReportsKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), timeout, p_fault_counts, p_fault_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceFaultReportsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultReportsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_fault_reports_khr(
&self,
timeout: u64,
p_fault_counts: *mut u32,
p_fault_info: *mut vk::DeviceFaultInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_fault_reports_khr(self, timeout, p_fault_counts, p_fault_info) }
}
}
/// Call `vkGetDeviceFaultDebugInfoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultDebugInfoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_fault_debug_info_khr(
device: &Device,
p_debug_info: *mut vk::DeviceFaultDebugInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_device_fault_debug_info_khr
.ok_or(CallError::MissingCommand("vkGetDeviceFaultDebugInfoKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_debug_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDeviceFaultDebugInfoKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceFaultDebugInfoKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_fault_debug_info_khr(
&self,
p_debug_info: *mut vk::DeviceFaultDebugInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_fault_debug_info_khr(self, p_debug_info) }
}
}
/// Call `vkCmdSetDepthBias2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBias2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_bias2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_depth_bias_info: *const vk::DepthBiasInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_bias2_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthBias2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_depth_bias_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthBias2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthBias2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_bias2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_depth_bias_info: *const vk::DepthBiasInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_depth_bias2_ext(self, command_buffer, p_depth_bias_info) }
}
}
/// Call `vkReleaseSwapchainImagesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseSwapchainImagesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_swapchain_images_khr(
device: &Device,
p_release_info: *const vk::ReleaseSwapchainImagesInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.release_swapchain_images_khr
.ok_or(CallError::MissingCommand("vkReleaseSwapchainImagesKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_release_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkReleaseSwapchainImagesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseSwapchainImagesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_swapchain_images_khr(
&self,
p_release_info: *const vk::ReleaseSwapchainImagesInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_swapchain_images_khr(self, p_release_info) }
}
}
/// Call `vkReleaseSwapchainImagesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseSwapchainImagesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn release_swapchain_images_ext(
device: &Device,
p_release_info: *const vk::ReleaseSwapchainImagesInfoKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.release_swapchain_images_ext
.ok_or(CallError::MissingCommand("vkReleaseSwapchainImagesEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_release_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkReleaseSwapchainImagesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkReleaseSwapchainImagesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn release_swapchain_images_ext(
&self,
p_release_info: *const vk::ReleaseSwapchainImagesInfoKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { release_swapchain_images_ext(self, p_release_info) }
}
}
/// Call `vkGetDeviceImageSubresourceLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSubresourceLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_subresource_layout(
device: &Device,
p_info: *const vk::DeviceImageSubresourceInfo,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_image_subresource_layout
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageSubresourceLayout",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_layout) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageSubresourceLayout` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSubresourceLayout` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_subresource_layout(
&self,
p_info: *const vk::DeviceImageSubresourceInfo,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_image_subresource_layout(self, p_info, p_layout) }
}
}
/// Call `vkGetDeviceImageSubresourceLayoutKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSubresourceLayoutKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_image_subresource_layout_khr(
device: &Device,
p_info: *const vk::DeviceImageSubresourceInfo,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_device_image_subresource_layout_khr
.ok_or(CallError::MissingCommand(
"vkGetDeviceImageSubresourceLayoutKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_layout) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceImageSubresourceLayoutKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceImageSubresourceLayoutKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_image_subresource_layout_khr(
&self,
p_info: *const vk::DeviceImageSubresourceInfo,
p_layout: *mut vk::SubresourceLayout2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_image_subresource_layout_khr(self, p_info, p_layout) }
}
}
/// Call `vkMapMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMapMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn map_memory2(
device: &Device,
p_memory_map_info: *const vk::MemoryMapInfo,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.map_memory2
.ok_or(CallError::MissingCommand("vkMapMemory2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_memory_map_info, pp_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkMapMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMapMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn map_memory2(
&self,
p_memory_map_info: *const vk::MemoryMapInfo,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { map_memory2(self, p_memory_map_info, pp_data) }
}
}
/// Call `vkMapMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMapMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn map_memory2_khr(
device: &Device,
p_memory_map_info: *const vk::MemoryMapInfo,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.map_memory2_khr
.ok_or(CallError::MissingCommand("vkMapMemory2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_memory_map_info, pp_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkMapMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkMapMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn map_memory2_khr(
&self,
p_memory_map_info: *const vk::MemoryMapInfo,
pp_data: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { map_memory2_khr(self, p_memory_map_info, pp_data) }
}
}
/// Call `vkUnmapMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnmapMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn unmap_memory2(
device: &Device,
p_memory_unmap_info: *const vk::MemoryUnmapInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.unmap_memory2
.ok_or(CallError::MissingCommand("vkUnmapMemory2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_memory_unmap_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkUnmapMemory2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnmapMemory2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn unmap_memory2(
&self,
p_memory_unmap_info: *const vk::MemoryUnmapInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { unmap_memory2(self, p_memory_unmap_info) }
}
}
/// Call `vkUnmapMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnmapMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn unmap_memory2_khr(
device: &Device,
p_memory_unmap_info: *const vk::MemoryUnmapInfo,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.unmap_memory2_khr
.ok_or(CallError::MissingCommand("vkUnmapMemory2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_memory_unmap_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkUnmapMemory2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnmapMemory2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn unmap_memory2_khr(
&self,
p_memory_unmap_info: *const vk::MemoryUnmapInfo,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { unmap_memory2_khr(self, p_memory_unmap_info) }
}
}
/// Call `vkCreateShadersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShadersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_shaders_ext(
device: &Device,
create_info_count: u32,
p_create_infos: *const vk::ShaderCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_shaders: *mut vk::ShaderEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_shaders_ext
.ok_or(CallError::MissingCommand("vkCreateShadersEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
create_info_count,
p_create_infos,
p_allocator,
p_shaders,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateShadersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShadersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_shaders_ext(
&self,
create_info_count: u32,
p_create_infos: *const vk::ShaderCreateInfoEXT,
p_allocator: *const vk::AllocationCallbacks,
p_shaders: *mut vk::ShaderEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_shaders_ext(
self,
create_info_count,
p_create_infos,
p_allocator,
p_shaders,
)
}
}
}
/// Call `vkDestroyShaderEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_shader_ext(
device: &Device,
shader: vk::ShaderEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_shader_ext
.ok_or(CallError::MissingCommand("vkDestroyShaderEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), shader, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyShaderEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_shader_ext(
&self,
shader: vk::ShaderEXT,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_shader_ext(self, shader, p_allocator) }
}
}
/// Call `vkGetShaderBinaryDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderBinaryDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_shader_binary_data_ext(
device: &Device,
shader: vk::ShaderEXT,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_shader_binary_data_ext
.ok_or(CallError::MissingCommand("vkGetShaderBinaryDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), shader, p_data_size, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetShaderBinaryDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderBinaryDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_shader_binary_data_ext(
&self,
shader: vk::ShaderEXT,
p_data_size: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_shader_binary_data_ext(self, shader, p_data_size, p_data) }
}
}
/// Call `vkCmdBindShadersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindShadersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_shaders_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
stage_count: u32,
p_stages: *const vk::ShaderStageFlagBits,
p_shaders: *const vk::ShaderEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_shaders_ext
.ok_or(CallError::MissingCommand("vkCmdBindShadersEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, stage_count, p_stages, p_shaders) };
Ok(())
}
impl Device {
/// Call `vkCmdBindShadersEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindShadersEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_shaders_ext(
&self,
command_buffer: vk::CommandBuffer,
stage_count: u32,
p_stages: *const vk::ShaderStageFlagBits,
p_shaders: *const vk::ShaderEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_shaders_ext(self, command_buffer, stage_count, p_stages, p_shaders) }
}
}
/// Call `vkSetSwapchainPresentTimingQueueSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetSwapchainPresentTimingQueueSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_swapchain_present_timing_queue_size_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
size: u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_swapchain_present_timing_queue_size_ext
.ok_or(CallError::MissingCommand(
"vkSetSwapchainPresentTimingQueueSizeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, size) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetSwapchainPresentTimingQueueSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetSwapchainPresentTimingQueueSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_swapchain_present_timing_queue_size_ext(
&self,
swapchain: vk::SwapchainKHR,
size: u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_swapchain_present_timing_queue_size_ext(self, swapchain, size) }
}
}
/// Call `vkGetSwapchainTimingPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainTimingPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_swapchain_timing_properties_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
p_swapchain_timing_properties: *mut vk::SwapchainTimingPropertiesEXT,
p_swapchain_timing_properties_counter: *mut u64,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_swapchain_timing_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetSwapchainTimingPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain,
p_swapchain_timing_properties,
p_swapchain_timing_properties_counter,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSwapchainTimingPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainTimingPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_swapchain_timing_properties_ext(
&self,
swapchain: vk::SwapchainKHR,
p_swapchain_timing_properties: *mut vk::SwapchainTimingPropertiesEXT,
p_swapchain_timing_properties_counter: *mut u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_swapchain_timing_properties_ext(
self,
swapchain,
p_swapchain_timing_properties,
p_swapchain_timing_properties_counter,
)
}
}
}
/// Call `vkGetSwapchainTimeDomainPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainTimeDomainPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_swapchain_time_domain_properties_ext(
device: &Device,
swapchain: vk::SwapchainKHR,
p_swapchain_time_domain_properties: *mut vk::SwapchainTimeDomainPropertiesEXT,
p_time_domains_counter: *mut u64,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_swapchain_time_domain_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetSwapchainTimeDomainPropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
swapchain,
p_swapchain_time_domain_properties,
p_time_domains_counter,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetSwapchainTimeDomainPropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSwapchainTimeDomainPropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_swapchain_time_domain_properties_ext(
&self,
swapchain: vk::SwapchainKHR,
p_swapchain_time_domain_properties: *mut vk::SwapchainTimeDomainPropertiesEXT,
p_time_domains_counter: *mut u64,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_swapchain_time_domain_properties_ext(
self,
swapchain,
p_swapchain_time_domain_properties,
p_time_domains_counter,
)
}
}
}
/// Call `vkGetPastPresentationTimingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPastPresentationTimingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_past_presentation_timing_ext(
device: &Device,
p_past_presentation_timing_info: *const vk::PastPresentationTimingInfoEXT,
p_past_presentation_timing_properties: *mut vk::PastPresentationTimingPropertiesEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_past_presentation_timing_ext
.ok_or(CallError::MissingCommand("vkGetPastPresentationTimingEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_past_presentation_timing_info,
p_past_presentation_timing_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetPastPresentationTimingEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPastPresentationTimingEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_past_presentation_timing_ext(
&self,
p_past_presentation_timing_info: *const vk::PastPresentationTimingInfoEXT,
p_past_presentation_timing_properties: *mut vk::PastPresentationTimingPropertiesEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_past_presentation_timing_ext(
self,
p_past_presentation_timing_info,
p_past_presentation_timing_properties,
)
}
}
}
#[cfg(feature = "platform-screen")]
/// Call `vkGetScreenBufferPropertiesQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetScreenBufferPropertiesQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_screen_buffer_properties_qnx(
device: &Device,
buffer: *const vk::_screen_buffer,
p_properties: *mut vk::ScreenBufferPropertiesQNX,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_screen_buffer_properties_qnx
.ok_or(CallError::MissingCommand("vkGetScreenBufferPropertiesQNX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), buffer, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-screen")]
impl Device {
/// Call `vkGetScreenBufferPropertiesQNX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetScreenBufferPropertiesQNX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_screen_buffer_properties_qnx(
&self,
buffer: *const vk::_screen_buffer,
p_properties: *mut vk::ScreenBufferPropertiesQNX,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_screen_buffer_properties_qnx(self, buffer, p_properties) }
}
}
/// Call `vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_cooperative_matrix_properties_khr(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixPropertiesKHR,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_cooperative_matrix_properties_khr
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_cooperative_matrix_properties_khr(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixPropertiesKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_cooperative_matrix_properties_khr(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceCooperativeMatrixProperties2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixProperties2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_cooperative_matrix_properties2_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_cooperative_matrix_info: *const vk::PhysicalDeviceCooperativeMatrixInfo2EXT,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixProperties2EXT,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_cooperative_matrix_properties2_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCooperativeMatrixProperties2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
p_cooperative_matrix_info,
p_property_count,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCooperativeMatrixProperties2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixProperties2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_cooperative_matrix_properties2_ext(
&self,
physical_device: vk::PhysicalDevice,
p_cooperative_matrix_info: *const vk::PhysicalDeviceCooperativeMatrixInfo2EXT,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixProperties2EXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_cooperative_matrix_properties2_ext(
self,
physical_device,
p_cooperative_matrix_info,
p_property_count,
p_properties,
)
}
}
}
#[cfg(feature = "provisional")]
/// Call `vkGetExecutionGraphPipelineScratchSizeAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExecutionGraphPipelineScratchSizeAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_execution_graph_pipeline_scratch_size_amdx(
device: &Device,
execution_graph: vk::Pipeline,
p_size_info: *mut vk::ExecutionGraphPipelineScratchSizeAMDX,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_execution_graph_pipeline_scratch_size_amdx
.ok_or(CallError::MissingCommand(
"vkGetExecutionGraphPipelineScratchSizeAMDX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), execution_graph, p_size_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkGetExecutionGraphPipelineScratchSizeAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExecutionGraphPipelineScratchSizeAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_execution_graph_pipeline_scratch_size_amdx(
&self,
execution_graph: vk::Pipeline,
p_size_info: *mut vk::ExecutionGraphPipelineScratchSizeAMDX,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_execution_graph_pipeline_scratch_size_amdx(self, execution_graph, p_size_info) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkGetExecutionGraphPipelineNodeIndexAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExecutionGraphPipelineNodeIndexAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_execution_graph_pipeline_node_index_amdx(
device: &Device,
execution_graph: vk::Pipeline,
p_node_info: *const vk::PipelineShaderStageNodeCreateInfoAMDX,
p_node_index: *mut u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_execution_graph_pipeline_node_index_amdx
.ok_or(CallError::MissingCommand(
"vkGetExecutionGraphPipelineNodeIndexAMDX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(device.handle(), execution_graph, p_node_info, p_node_index) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkGetExecutionGraphPipelineNodeIndexAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExecutionGraphPipelineNodeIndexAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_execution_graph_pipeline_node_index_amdx(
&self,
execution_graph: vk::Pipeline,
p_node_info: *const vk::PipelineShaderStageNodeCreateInfoAMDX,
p_node_index: *mut u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_execution_graph_pipeline_node_index_amdx(self, execution_graph, p_node_info, p_node_index)
}
}
}
#[cfg(feature = "provisional")]
/// Call `vkCreateExecutionGraphPipelinesAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateExecutionGraphPipelinesAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_execution_graph_pipelines_amdx(
device: &Device,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::ExecutionGraphPipelineCreateInfoAMDX,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_execution_graph_pipelines_amdx
.ok_or(CallError::MissingCommand(
"vkCreateExecutionGraphPipelinesAMDX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCreateExecutionGraphPipelinesAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateExecutionGraphPipelinesAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_execution_graph_pipelines_amdx(
&self,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::ExecutionGraphPipelineCreateInfoAMDX,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_execution_graph_pipelines_amdx(
self,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
}
}
}
#[cfg(feature = "provisional")]
/// Call `vkCmdInitializeGraphScratchMemoryAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdInitializeGraphScratchMemoryAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_initialize_graph_scratch_memory_amdx(
device: &Device,
command_buffer: vk::CommandBuffer,
execution_graph: vk::Pipeline,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_initialize_graph_scratch_memory_amdx
.ok_or(CallError::MissingCommand(
"vkCmdInitializeGraphScratchMemoryAMDX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, execution_graph, scratch, scratch_size) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCmdInitializeGraphScratchMemoryAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdInitializeGraphScratchMemoryAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_initialize_graph_scratch_memory_amdx(
&self,
command_buffer: vk::CommandBuffer,
execution_graph: vk::Pipeline,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_initialize_graph_scratch_memory_amdx(
self,
command_buffer,
execution_graph,
scratch,
scratch_size,
)
}
}
}
#[cfg(feature = "provisional")]
/// Call `vkCmdDispatchGraphAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_graph_amdx(
device: &Device,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
p_count_info: *const vk::DispatchGraphCountInfoAMDX,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_graph_amdx
.ok_or(CallError::MissingCommand("vkCmdDispatchGraphAMDX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, scratch, scratch_size, p_count_info) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCmdDispatchGraphAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_graph_amdx(
&self,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
p_count_info: *const vk::DispatchGraphCountInfoAMDX,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_dispatch_graph_amdx(self, command_buffer, scratch, scratch_size, p_count_info) }
}
}
#[cfg(feature = "provisional")]
/// Call `vkCmdDispatchGraphIndirectAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphIndirectAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_graph_indirect_amdx(
device: &Device,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
p_count_info: *const vk::DispatchGraphCountInfoAMDX,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_graph_indirect_amdx
.ok_or(CallError::MissingCommand("vkCmdDispatchGraphIndirectAMDX"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, scratch, scratch_size, p_count_info) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCmdDispatchGraphIndirectAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphIndirectAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_graph_indirect_amdx(
&self,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
p_count_info: *const vk::DispatchGraphCountInfoAMDX,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_dispatch_graph_indirect_amdx(self, command_buffer, scratch, scratch_size, p_count_info)
}
}
}
#[cfg(feature = "provisional")]
/// Call `vkCmdDispatchGraphIndirectCountAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphIndirectCountAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_graph_indirect_count_amdx(
device: &Device,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
count_info: vk::DeviceAddress,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_dispatch_graph_indirect_count_amdx
.ok_or(CallError::MissingCommand(
"vkCmdDispatchGraphIndirectCountAMDX",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, scratch, scratch_size, count_info) };
Ok(())
}
#[cfg(feature = "provisional")]
impl Device {
/// Call `vkCmdDispatchGraphIndirectCountAMDX` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchGraphIndirectCountAMDX` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_graph_indirect_count_amdx(
&self,
command_buffer: vk::CommandBuffer,
scratch: vk::DeviceAddress,
scratch_size: vk::DeviceSize,
count_info: vk::DeviceAddress,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_dispatch_graph_indirect_count_amdx(
self,
command_buffer,
scratch,
scratch_size,
count_info,
)
}
}
}
/// Call `vkCreateGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_gpa_session_amd(
device: &Device,
p_create_info: *const vk::GpaSessionCreateInfoAMD,
p_allocator: *const vk::AllocationCallbacks,
p_gpa_session: *mut vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_gpa_session_amd
.ok_or(CallError::MissingCommand("vkCreateGpaSessionAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_gpa_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_gpa_session_amd(
&self,
p_create_info: *const vk::GpaSessionCreateInfoAMD,
p_allocator: *const vk::AllocationCallbacks,
p_gpa_session: *mut vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_gpa_session_amd(self, p_create_info, p_allocator, p_gpa_session) }
}
}
/// Call `vkDestroyGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_gpa_session_amd(
device: &Device,
gpa_session: vk::GpaSessionAMD,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_gpa_session_amd
.ok_or(CallError::MissingCommand("vkDestroyGpaSessionAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), gpa_session, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_gpa_session_amd(
&self,
gpa_session: vk::GpaSessionAMD,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_gpa_session_amd(self, gpa_session, p_allocator) }
}
}
/// Call `vkSetGpaDeviceClockModeAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetGpaDeviceClockModeAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_gpa_device_clock_mode_amd(
device: &Device,
p_info: *mut vk::GpaDeviceClockModeInfoAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_gpa_device_clock_mode_amd
.ok_or(CallError::MissingCommand("vkSetGpaDeviceClockModeAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetGpaDeviceClockModeAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetGpaDeviceClockModeAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_gpa_device_clock_mode_amd(
&self,
p_info: *mut vk::GpaDeviceClockModeInfoAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_gpa_device_clock_mode_amd(self, p_info) }
}
}
/// Call `vkGetGpaDeviceClockInfoAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaDeviceClockInfoAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_gpa_device_clock_info_amd(
device: &Device,
p_info: *mut vk::GpaDeviceGetClockInfoAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_gpa_device_clock_info_amd
.ok_or(CallError::MissingCommand("vkGetGpaDeviceClockInfoAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetGpaDeviceClockInfoAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaDeviceClockInfoAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_gpa_device_clock_info_amd(
&self,
p_info: *mut vk::GpaDeviceGetClockInfoAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_gpa_device_clock_info_amd(self, p_info) }
}
}
/// Call `vkCmdBeginGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_gpa_session_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.cmd_begin_gpa_session_amd
.ok_or(CallError::MissingCommand("vkCmdBeginGpaSessionAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, gpa_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdBeginGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_gpa_session_amd(
&self,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_gpa_session_amd(self, command_buffer, gpa_session) }
}
}
/// Call `vkCmdEndGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_gpa_session_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.cmd_end_gpa_session_amd
.ok_or(CallError::MissingCommand("vkCmdEndGpaSessionAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(command_buffer, gpa_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdEndGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_gpa_session_amd(
&self,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_gpa_session_amd(self, command_buffer, gpa_session) }
}
}
/// Call `vkCmdBeginGpaSampleAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginGpaSampleAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_gpa_sample_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
p_gpa_sample_begin_info: *const vk::GpaSampleBeginInfoAMD,
p_sample_id: *mut u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.cmd_begin_gpa_sample_amd
.ok_or(CallError::MissingCommand("vkCmdBeginGpaSampleAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
command_buffer,
gpa_session,
p_gpa_sample_begin_info,
p_sample_id,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCmdBeginGpaSampleAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginGpaSampleAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_gpa_sample_amd(
&self,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
p_gpa_sample_begin_info: *const vk::GpaSampleBeginInfoAMD,
p_sample_id: *mut u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_gpa_sample_amd(
self,
command_buffer,
gpa_session,
p_gpa_sample_begin_info,
p_sample_id,
)
}
}
}
/// Call `vkCmdEndGpaSampleAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndGpaSampleAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_gpa_sample_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
sample_id: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_gpa_sample_amd
.ok_or(CallError::MissingCommand("vkCmdEndGpaSampleAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, gpa_session, sample_id) };
Ok(())
}
impl Device {
/// Call `vkCmdEndGpaSampleAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndGpaSampleAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_gpa_sample_amd(
&self,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
sample_id: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_gpa_sample_amd(self, command_buffer, gpa_session, sample_id) }
}
}
/// Call `vkGetGpaSessionStatusAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaSessionStatusAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_gpa_session_status_amd(
device: &Device,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_gpa_session_status_amd
.ok_or(CallError::MissingCommand("vkGetGpaSessionStatusAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), gpa_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetGpaSessionStatusAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaSessionStatusAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_gpa_session_status_amd(
&self,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_gpa_session_status_amd(self, gpa_session) }
}
}
/// Call `vkGetGpaSessionResultsAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaSessionResultsAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_gpa_session_results_amd(
device: &Device,
gpa_session: vk::GpaSessionAMD,
sample_id: u32,
p_size_in_bytes: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_gpa_session_results_amd
.ok_or(CallError::MissingCommand("vkGetGpaSessionResultsAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
gpa_session,
sample_id,
p_size_in_bytes,
p_data,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetGpaSessionResultsAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetGpaSessionResultsAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_gpa_session_results_amd(
&self,
gpa_session: vk::GpaSessionAMD,
sample_id: u32,
p_size_in_bytes: *mut usize,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_gpa_session_results_amd(self, gpa_session, sample_id, p_size_in_bytes, p_data) }
}
}
/// Call `vkResetGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn reset_gpa_session_amd(
device: &Device,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.reset_gpa_session_amd
.ok_or(CallError::MissingCommand("vkResetGpaSessionAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), gpa_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkResetGpaSessionAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkResetGpaSessionAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn reset_gpa_session_amd(
&self,
gpa_session: vk::GpaSessionAMD,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { reset_gpa_session_amd(self, gpa_session) }
}
}
/// Call `vkCmdCopyGpaSessionResultsAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyGpaSessionResultsAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_gpa_session_results_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_gpa_session_results_amd
.ok_or(CallError::MissingCommand("vkCmdCopyGpaSessionResultsAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, gpa_session) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyGpaSessionResultsAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyGpaSessionResultsAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_gpa_session_results_amd(
&self,
command_buffer: vk::CommandBuffer,
gpa_session: vk::GpaSessionAMD,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_gpa_session_results_amd(self, command_buffer, gpa_session) }
}
}
/// Call `vkCmdBindDescriptorSets2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_descriptor_sets2(
device: &Device,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_sets_info: *const vk::BindDescriptorSetsInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_sets2
.ok_or(CallError::MissingCommand("vkCmdBindDescriptorSets2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_bind_descriptor_sets_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorSets2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_descriptor_sets2(
&self,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_sets_info: *const vk::BindDescriptorSetsInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_descriptor_sets2(self, command_buffer, p_bind_descriptor_sets_info) }
}
}
/// Call `vkCmdBindDescriptorSets2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_descriptor_sets2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_sets_info: *const vk::BindDescriptorSetsInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_sets2_khr
.ok_or(CallError::MissingCommand("vkCmdBindDescriptorSets2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_bind_descriptor_sets_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorSets2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorSets2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_descriptor_sets2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_sets_info: *const vk::BindDescriptorSetsInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_descriptor_sets2_khr(self, command_buffer, p_bind_descriptor_sets_info) }
}
}
/// Call `vkCmdPushConstants2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_constants2(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_constants_info: *const vk::PushConstantsInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_constants2
.ok_or(CallError::MissingCommand("vkCmdPushConstants2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_constants_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushConstants2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_constants2(
&self,
command_buffer: vk::CommandBuffer,
p_push_constants_info: *const vk::PushConstantsInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_constants2(self, command_buffer, p_push_constants_info) }
}
}
/// Call `vkCmdPushConstants2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_constants2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_constants_info: *const vk::PushConstantsInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_constants2_khr
.ok_or(CallError::MissingCommand("vkCmdPushConstants2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_constants_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushConstants2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushConstants2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_constants2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_push_constants_info: *const vk::PushConstantsInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_constants2_khr(self, command_buffer, p_push_constants_info) }
}
}
/// Call `vkCmdPushDescriptorSet2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set2(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_info: *const vk::PushDescriptorSetInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set2
.ok_or(CallError::MissingCommand("vkCmdPushDescriptorSet2"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_descriptor_set_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSet2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set2(
&self,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_info: *const vk::PushDescriptorSetInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_descriptor_set2(self, command_buffer, p_push_descriptor_set_info) }
}
}
/// Call `vkCmdPushDescriptorSet2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_info: *const vk::PushDescriptorSetInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set2_khr
.ok_or(CallError::MissingCommand("vkCmdPushDescriptorSet2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_descriptor_set_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSet2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSet2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_info: *const vk::PushDescriptorSetInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_descriptor_set2_khr(self, command_buffer, p_push_descriptor_set_info) }
}
}
/// Call `vkCmdPushDescriptorSetWithTemplate2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set_with_template2(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_with_template_info: *const vk::PushDescriptorSetWithTemplateInfo,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_push_descriptor_set_with_template2
.ok_or(CallError::MissingCommand(
"vkCmdPushDescriptorSetWithTemplate2",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_descriptor_set_with_template_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSetWithTemplate2` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate2` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set_with_template2(
&self,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_with_template_info: *const vk::PushDescriptorSetWithTemplateInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set_with_template2(
self,
command_buffer,
p_push_descriptor_set_with_template_info,
)
}
}
}
/// Call `vkCmdPushDescriptorSetWithTemplate2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_descriptor_set_with_template2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_with_template_info: *const vk::PushDescriptorSetWithTemplateInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_descriptor_set_with_template2_khr
.ok_or(CallError::MissingCommand(
"vkCmdPushDescriptorSetWithTemplate2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_descriptor_set_with_template_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushDescriptorSetWithTemplate2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDescriptorSetWithTemplate2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_descriptor_set_with_template2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_push_descriptor_set_with_template_info: *const vk::PushDescriptorSetWithTemplateInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_push_descriptor_set_with_template2_khr(
self,
command_buffer,
p_push_descriptor_set_with_template_info,
)
}
}
}
/// Call `vkCmdSetDescriptorBufferOffsets2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDescriptorBufferOffsets2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_descriptor_buffer_offsets2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_set_descriptor_buffer_offsets_info: *const vk::SetDescriptorBufferOffsetsInfoEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_descriptor_buffer_offsets2_ext
.ok_or(CallError::MissingCommand(
"vkCmdSetDescriptorBufferOffsets2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_set_descriptor_buffer_offsets_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDescriptorBufferOffsets2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDescriptorBufferOffsets2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_descriptor_buffer_offsets2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_set_descriptor_buffer_offsets_info: *const vk::SetDescriptorBufferOffsetsInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_descriptor_buffer_offsets2_ext(
self,
command_buffer,
p_set_descriptor_buffer_offsets_info,
)
}
}
}
/// Call `vkCmdBindDescriptorBufferEmbeddedSamplers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBufferEmbeddedSamplers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_descriptor_buffer_embedded_samplers2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_buffer_embedded_samplers_info: *const vk::BindDescriptorBufferEmbeddedSamplersInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_descriptor_buffer_embedded_samplers2_ext
.ok_or(CallError::MissingCommand(
"vkCmdBindDescriptorBufferEmbeddedSamplers2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
p_bind_descriptor_buffer_embedded_samplers_info,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindDescriptorBufferEmbeddedSamplers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindDescriptorBufferEmbeddedSamplers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_descriptor_buffer_embedded_samplers2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_bind_descriptor_buffer_embedded_samplers_info: *const vk::BindDescriptorBufferEmbeddedSamplersInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_descriptor_buffer_embedded_samplers2_ext(
self,
command_buffer,
p_bind_descriptor_buffer_embedded_samplers_info,
)
}
}
}
/// Call `vkSetLatencySleepModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencySleepModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_latency_sleep_mode_nv(
device: &Device,
swapchain: vk::SwapchainKHR,
p_sleep_mode_info: *const vk::LatencySleepModeInfoNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.set_latency_sleep_mode_nv
.ok_or(CallError::MissingCommand("vkSetLatencySleepModeNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, p_sleep_mode_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkSetLatencySleepModeNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencySleepModeNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_latency_sleep_mode_nv(
&self,
swapchain: vk::SwapchainKHR,
p_sleep_mode_info: *const vk::LatencySleepModeInfoNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_latency_sleep_mode_nv(self, swapchain, p_sleep_mode_info) }
}
}
/// Call `vkLatencySleepNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkLatencySleepNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn latency_sleep_nv(
device: &Device,
swapchain: vk::SwapchainKHR,
p_sleep_info: *const vk::LatencySleepInfoNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.latency_sleep_nv
.ok_or(CallError::MissingCommand("vkLatencySleepNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), swapchain, p_sleep_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkLatencySleepNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkLatencySleepNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn latency_sleep_nv(
&self,
swapchain: vk::SwapchainKHR,
p_sleep_info: *const vk::LatencySleepInfoNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { latency_sleep_nv(self, swapchain, p_sleep_info) }
}
}
/// Call `vkSetLatencyMarkerNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencyMarkerNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_latency_marker_nv(
device: &Device,
swapchain: vk::SwapchainKHR,
p_latency_marker_info: *const vk::SetLatencyMarkerInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_latency_marker_nv
.ok_or(CallError::MissingCommand("vkSetLatencyMarkerNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), swapchain, p_latency_marker_info) };
Ok(())
}
impl Device {
/// Call `vkSetLatencyMarkerNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencyMarkerNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_latency_marker_nv(
&self,
swapchain: vk::SwapchainKHR,
p_latency_marker_info: *const vk::SetLatencyMarkerInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_latency_marker_nv(self, swapchain, p_latency_marker_info) }
}
}
/// Call `vkGetLatencyTimingsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetLatencyTimingsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_latency_timings_nv(
device: &Device,
swapchain: vk::SwapchainKHR,
p_latency_marker_info: *mut vk::GetLatencyMarkerInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_latency_timings_nv
.ok_or(CallError::MissingCommand("vkGetLatencyTimingsNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), swapchain, p_latency_marker_info) };
Ok(())
}
impl Device {
/// Call `vkGetLatencyTimingsNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetLatencyTimingsNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_latency_timings_nv(
&self,
swapchain: vk::SwapchainKHR,
p_latency_marker_info: *mut vk::GetLatencyMarkerInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_latency_timings_nv(self, swapchain, p_latency_marker_info) }
}
}
/// Call `vkQueueNotifyOutOfBandNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueNotifyOutOfBandNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_notify_out_of_band_nv(
device: &Device,
queue: vk::Queue,
p_queue_type_info: *const vk::OutOfBandQueueTypeInfoNV,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_notify_out_of_band_nv
.ok_or(CallError::MissingCommand("vkQueueNotifyOutOfBandNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, p_queue_type_info) };
Ok(())
}
impl Device {
/// Call `vkQueueNotifyOutOfBandNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueNotifyOutOfBandNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_notify_out_of_band_nv(
&self,
queue: vk::Queue,
p_queue_type_info: *const vk::OutOfBandQueueTypeInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_notify_out_of_band_nv(self, queue, p_queue_type_info) }
}
}
/// Call `vkSetLatencySleepModeLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencySleepModeLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_latency_sleep_mode_legacy_nv(
device: &Device,
low_latency_mode: vk::Bool32,
low_latency_boost: vk::Bool32,
minimum_interval_us: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_latency_sleep_mode_legacy_nv
.ok_or(CallError::MissingCommand("vkSetLatencySleepModeLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
device.handle(),
low_latency_mode,
low_latency_boost,
minimum_interval_us,
)
};
Ok(())
}
impl Device {
/// Call `vkSetLatencySleepModeLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencySleepModeLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_latency_sleep_mode_legacy_nv(
&self,
low_latency_mode: vk::Bool32,
low_latency_boost: vk::Bool32,
minimum_interval_us: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
set_latency_sleep_mode_legacy_nv(
self,
low_latency_mode,
low_latency_boost,
minimum_interval_us,
)
}
}
}
/// Call `vkLatencySleepLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkLatencySleepLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn latency_sleep_legacy_nv(
device: &Device,
signal_semaphore: vk::Semaphore,
value: u64,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.latency_sleep_legacy_nv
.ok_or(CallError::MissingCommand("vkLatencySleepLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), signal_semaphore, value) };
Ok(())
}
impl Device {
/// Call `vkLatencySleepLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkLatencySleepLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn latency_sleep_legacy_nv(
&self,
signal_semaphore: vk::Semaphore,
value: u64,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { latency_sleep_legacy_nv(self, signal_semaphore, value) }
}
}
/// Call `vkSetLatencyMarkerLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencyMarkerLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn set_latency_marker_legacy_nv(
device: &Device,
frame_id: u64,
marker: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.set_latency_marker_legacy_nv
.ok_or(CallError::MissingCommand("vkSetLatencyMarkerLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), frame_id, marker) };
Ok(())
}
impl Device {
/// Call `vkSetLatencyMarkerLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkSetLatencyMarkerLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn set_latency_marker_legacy_nv(
&self,
frame_id: u64,
marker: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { set_latency_marker_legacy_nv(self, frame_id, marker) }
}
}
/// Call `vkGetLatencyTimingsLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetLatencyTimingsLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_latency_timings_legacy_nv(
device: &Device,
p_timings: *mut std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_latency_timings_legacy_nv
.ok_or(CallError::MissingCommand("vkGetLatencyTimingsLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_timings) };
Ok(())
}
impl Device {
/// Call `vkGetLatencyTimingsLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetLatencyTimingsLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_latency_timings_legacy_nv(
&self,
p_timings: *mut std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_latency_timings_legacy_nv(self, p_timings) }
}
}
/// Call `vkQueueNotifyOutOfBandLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueNotifyOutOfBandLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_notify_out_of_band_legacy_nv(
device: &Device,
queue: vk::Queue,
queue_type: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.queue_notify_out_of_band_legacy_nv
.ok_or(CallError::MissingCommand("vkQueueNotifyOutOfBandLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(queue, queue_type) };
Ok(())
}
impl Device {
/// Call `vkQueueNotifyOutOfBandLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueNotifyOutOfBandLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_notify_out_of_band_legacy_nv(
&self,
queue: vk::Queue,
queue_type: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_notify_out_of_band_legacy_nv(self, queue, queue_type) }
}
}
/// Call `vkGetSleepStatusLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSleepStatusLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_sleep_status_legacy_nv(
device: &Device,
p_low_latency_mode: *mut vk::Bool32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_sleep_status_legacy_nv
.ok_or(CallError::MissingCommand("vkGetSleepStatusLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_low_latency_mode) };
Ok(())
}
impl Device {
/// Call `vkGetSleepStatusLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetSleepStatusLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_sleep_status_legacy_nv(
&self,
p_low_latency_mode: *mut vk::Bool32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_sleep_status_legacy_nv(self, p_low_latency_mode) }
}
}
/// Call `vkShutdownLatencyDeviceLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkShutdownLatencyDeviceLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn shutdown_latency_device_legacy_nv(device: &Device) -> Result<(), CallError> {
let __vk_function = device
.fp()
.shutdown_latency_device_legacy_nv
.ok_or(CallError::MissingCommand("vkShutdownLatencyDeviceLegacyNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle()) };
Ok(())
}
impl Device {
/// Call `vkShutdownLatencyDeviceLegacyNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkShutdownLatencyDeviceLegacyNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn shutdown_latency_device_legacy_nv(&self) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { shutdown_latency_device_legacy_nv(self) }
}
}
/// Call `vkCmdSetRenderingAttachmentLocations` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingAttachmentLocations` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rendering_attachment_locations(
device: &Device,
command_buffer: vk::CommandBuffer,
p_location_info: *const vk::RenderingAttachmentLocationInfo,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_rendering_attachment_locations
.ok_or(CallError::MissingCommand(
"vkCmdSetRenderingAttachmentLocations",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_location_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRenderingAttachmentLocations` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingAttachmentLocations` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rendering_attachment_locations(
&self,
command_buffer: vk::CommandBuffer,
p_location_info: *const vk::RenderingAttachmentLocationInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_rendering_attachment_locations(self, command_buffer, p_location_info) }
}
}
/// Call `vkCmdSetRenderingAttachmentLocationsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingAttachmentLocationsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rendering_attachment_locations_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_location_info: *const vk::RenderingAttachmentLocationInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rendering_attachment_locations_khr
.ok_or(CallError::MissingCommand(
"vkCmdSetRenderingAttachmentLocationsKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_location_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRenderingAttachmentLocationsKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingAttachmentLocationsKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rendering_attachment_locations_khr(
&self,
command_buffer: vk::CommandBuffer,
p_location_info: *const vk::RenderingAttachmentLocationInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_rendering_attachment_locations_khr(self, command_buffer, p_location_info) }
}
}
/// Call `vkCmdSetRenderingInputAttachmentIndices` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingInputAttachmentIndices` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rendering_input_attachment_indices(
device: &Device,
command_buffer: vk::CommandBuffer,
p_input_attachment_index_info: *const vk::RenderingInputAttachmentIndexInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rendering_input_attachment_indices
.ok_or(CallError::MissingCommand(
"vkCmdSetRenderingInputAttachmentIndices",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_input_attachment_index_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRenderingInputAttachmentIndices` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingInputAttachmentIndices` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rendering_input_attachment_indices(
&self,
command_buffer: vk::CommandBuffer,
p_input_attachment_index_info: *const vk::RenderingInputAttachmentIndexInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_rendering_input_attachment_indices(
self,
command_buffer,
p_input_attachment_index_info,
)
}
}
}
/// Call `vkCmdSetRenderingInputAttachmentIndicesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingInputAttachmentIndicesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_rendering_input_attachment_indices_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_input_attachment_index_info: *const vk::RenderingInputAttachmentIndexInfo,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_rendering_input_attachment_indices_khr
.ok_or(CallError::MissingCommand(
"vkCmdSetRenderingInputAttachmentIndicesKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_input_attachment_index_info) };
Ok(())
}
impl Device {
/// Call `vkCmdSetRenderingInputAttachmentIndicesKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetRenderingInputAttachmentIndicesKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_rendering_input_attachment_indices_khr(
&self,
command_buffer: vk::CommandBuffer,
p_input_attachment_index_info: *const vk::RenderingInputAttachmentIndexInfo,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_rendering_input_attachment_indices_khr(
self,
command_buffer,
p_input_attachment_index_info,
)
}
}
}
/// Call `vkCmdSetDepthClampRangeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClampRangeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_depth_clamp_range_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
depth_clamp_mode: vk::DepthClampModeEXT,
p_depth_clamp_range: *const vk::DepthClampRangeEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_depth_clamp_range_ext
.ok_or(CallError::MissingCommand("vkCmdSetDepthClampRangeEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, depth_clamp_mode, p_depth_clamp_range) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDepthClampRangeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDepthClampRangeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_depth_clamp_range_ext(
&self,
command_buffer: vk::CommandBuffer,
depth_clamp_mode: vk::DepthClampModeEXT,
p_depth_clamp_range: *const vk::DepthClampRangeEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_set_depth_clamp_range_ext(self, command_buffer, depth_clamp_mode, p_depth_clamp_range)
}
}
}
/// Call `vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixFlexibleDimensionsPropertiesNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeMatrixFlexibleDimensionsPropertiesNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
#[cfg(feature = "platform-metal")]
/// Call `vkGetMemoryMetalHandleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryMetalHandleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_metal_handle_ext(
device: &Device,
p_get_metal_handle_info: *const vk::MemoryGetMetalHandleInfoEXT,
p_handle: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_metal_handle_ext
.ok_or(CallError::MissingCommand("vkGetMemoryMetalHandleEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_get_metal_handle_info, p_handle) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-metal")]
impl Device {
/// Call `vkGetMemoryMetalHandleEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryMetalHandleEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_metal_handle_ext(
&self,
p_get_metal_handle_info: *const vk::MemoryGetMetalHandleInfoEXT,
p_handle: *mut *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_metal_handle_ext(self, p_get_metal_handle_info, p_handle) }
}
}
#[cfg(feature = "platform-metal")]
/// Call `vkGetMemoryMetalHandlePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryMetalHandlePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_metal_handle_properties_ext(
device: &Device,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
p_handle: *const std::ffi::c_void,
p_memory_metal_handle_properties: *mut vk::MemoryMetalHandlePropertiesEXT,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_memory_metal_handle_properties_ext
.ok_or(CallError::MissingCommand(
"vkGetMemoryMetalHandlePropertiesEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
handle_type,
p_handle,
p_memory_metal_handle_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-metal")]
impl Device {
/// Call `vkGetMemoryMetalHandlePropertiesEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryMetalHandlePropertiesEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_metal_handle_properties_ext(
&self,
handle_type: vk::ExternalMemoryHandleTypeFlagBits,
p_handle: *const std::ffi::c_void,
p_memory_metal_handle_properties: *mut vk::MemoryMetalHandlePropertiesEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_memory_metal_handle_properties_ext(
self,
handle_type,
p_handle,
p_memory_metal_handle_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceCooperativeVectorPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeVectorPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_cooperative_vector_properties_nv(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeVectorPropertiesNV,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_cooperative_vector_properties_nv
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceCooperativeVectorPropertiesNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_property_count, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceCooperativeVectorPropertiesNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceCooperativeVectorPropertiesNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_cooperative_vector_properties_nv(
&self,
physical_device: vk::PhysicalDevice,
p_property_count: *mut u32,
p_properties: *mut vk::CooperativeVectorPropertiesNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_cooperative_vector_properties_nv(
self,
physical_device,
p_property_count,
p_properties,
)
}
}
}
/// Call `vkConvertCooperativeVectorMatrixNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkConvertCooperativeVectorMatrixNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn convert_cooperative_vector_matrix_nv(
device: &Device,
p_info: *const vk::ConvertCooperativeVectorMatrixInfoNV,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.convert_cooperative_vector_matrix_nv
.ok_or(CallError::MissingCommand(
"vkConvertCooperativeVectorMatrixNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkConvertCooperativeVectorMatrixNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkConvertCooperativeVectorMatrixNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn convert_cooperative_vector_matrix_nv(
&self,
p_info: *const vk::ConvertCooperativeVectorMatrixInfoNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { convert_cooperative_vector_matrix_nv(self, p_info) }
}
}
/// Call `vkCmdConvertCooperativeVectorMatrixNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdConvertCooperativeVectorMatrixNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_convert_cooperative_vector_matrix_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::ConvertCooperativeVectorMatrixInfoNV,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_convert_cooperative_vector_matrix_nv
.ok_or(CallError::MissingCommand(
"vkCmdConvertCooperativeVectorMatrixNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, info_count, p_infos) };
Ok(())
}
impl Device {
/// Call `vkCmdConvertCooperativeVectorMatrixNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdConvertCooperativeVectorMatrixNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_convert_cooperative_vector_matrix_nv(
&self,
command_buffer: vk::CommandBuffer,
info_count: u32,
p_infos: *const vk::ConvertCooperativeVectorMatrixInfoNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_convert_cooperative_vector_matrix_nv(self, command_buffer, info_count, p_infos) }
}
}
/// Call `vkCmdDispatchTileQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchTileQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_tile_qcom(
device: &Device,
command_buffer: vk::CommandBuffer,
p_dispatch_tile_info: *const vk::DispatchTileInfoQCOM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_tile_qcom
.ok_or(CallError::MissingCommand("vkCmdDispatchTileQCOM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_dispatch_tile_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDispatchTileQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchTileQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_tile_qcom(
&self,
command_buffer: vk::CommandBuffer,
p_dispatch_tile_info: *const vk::DispatchTileInfoQCOM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_dispatch_tile_qcom(self, command_buffer, p_dispatch_tile_info) }
}
}
/// Call `vkCmdBeginPerTileExecutionQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginPerTileExecutionQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_per_tile_execution_qcom(
device: &Device,
command_buffer: vk::CommandBuffer,
p_per_tile_begin_info: *const vk::PerTileBeginInfoQCOM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_per_tile_execution_qcom
.ok_or(CallError::MissingCommand("vkCmdBeginPerTileExecutionQCOM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_per_tile_begin_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginPerTileExecutionQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginPerTileExecutionQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_per_tile_execution_qcom(
&self,
command_buffer: vk::CommandBuffer,
p_per_tile_begin_info: *const vk::PerTileBeginInfoQCOM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_per_tile_execution_qcom(self, command_buffer, p_per_tile_begin_info) }
}
}
/// Call `vkCmdEndPerTileExecutionQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndPerTileExecutionQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_per_tile_execution_qcom(
device: &Device,
command_buffer: vk::CommandBuffer,
p_per_tile_end_info: *const vk::PerTileEndInfoQCOM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_per_tile_execution_qcom
.ok_or(CallError::MissingCommand("vkCmdEndPerTileExecutionQCOM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_per_tile_end_info) };
Ok(())
}
impl Device {
/// Call `vkCmdEndPerTileExecutionQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndPerTileExecutionQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_per_tile_execution_qcom(
&self,
command_buffer: vk::CommandBuffer,
p_per_tile_end_info: *const vk::PerTileEndInfoQCOM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_per_tile_execution_qcom(self, command_buffer, p_per_tile_end_info) }
}
}
/// Call `vkCreateExternalComputeQueueNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateExternalComputeQueueNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_external_compute_queue_nv(
device: &Device,
p_create_info: *const vk::ExternalComputeQueueCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_external_queue: *mut vk::ExternalComputeQueueNV,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_external_compute_queue_nv
.ok_or(CallError::MissingCommand("vkCreateExternalComputeQueueNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_external_queue,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateExternalComputeQueueNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateExternalComputeQueueNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_external_compute_queue_nv(
&self,
p_create_info: *const vk::ExternalComputeQueueCreateInfoNV,
p_allocator: *const vk::AllocationCallbacks,
p_external_queue: *mut vk::ExternalComputeQueueNV,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_external_compute_queue_nv(self, p_create_info, p_allocator, p_external_queue) }
}
}
/// Call `vkDestroyExternalComputeQueueNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyExternalComputeQueueNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_external_compute_queue_nv(
device: &Device,
external_queue: vk::ExternalComputeQueueNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_external_compute_queue_nv
.ok_or(CallError::MissingCommand("vkDestroyExternalComputeQueueNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), external_queue, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyExternalComputeQueueNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyExternalComputeQueueNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_external_compute_queue_nv(
&self,
external_queue: vk::ExternalComputeQueueNV,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_external_compute_queue_nv(self, external_queue, p_allocator) }
}
}
/// Call `vkGetExternalComputeQueueDataNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExternalComputeQueueDataNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_external_compute_queue_data_nv(
device: &Device,
external_queue: vk::ExternalComputeQueueNV,
params: *mut vk::ExternalComputeQueueDataParamsNV,
p_data: *mut std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_external_compute_queue_data_nv
.ok_or(CallError::MissingCommand("vkGetExternalComputeQueueDataNV"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(external_queue, params, p_data) };
Ok(())
}
impl Device {
/// Call `vkGetExternalComputeQueueDataNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetExternalComputeQueueDataNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_external_compute_queue_data_nv(
&self,
external_queue: vk::ExternalComputeQueueNV,
params: *mut vk::ExternalComputeQueueDataParamsNV,
p_data: *mut std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_external_compute_queue_data_nv(self, external_queue, params, p_data) }
}
}
/// Call `vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn enumerate_physical_device_shader_instrumentation_metrics_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_description_count: *mut u32,
p_descriptions: *mut vk::ShaderInstrumentationMetricDescriptionARM,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.enumerate_physical_device_shader_instrumentation_metrics_arm
.ok_or(CallError::MissingCommand(
"vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, p_description_count, p_descriptions) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn enumerate_physical_device_shader_instrumentation_metrics_arm(
&self,
physical_device: vk::PhysicalDevice,
p_description_count: *mut u32,
p_descriptions: *mut vk::ShaderInstrumentationMetricDescriptionARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
enumerate_physical_device_shader_instrumentation_metrics_arm(
self,
physical_device,
p_description_count,
p_descriptions,
)
}
}
}
/// Call `vkCreateShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_shader_instrumentation_arm(
device: &Device,
p_create_info: *const vk::ShaderInstrumentationCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_instrumentation: *mut vk::ShaderInstrumentationARM,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_shader_instrumentation_arm
.ok_or(CallError::MissingCommand(
"vkCreateShaderInstrumentationARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_instrumentation,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_shader_instrumentation_arm(
&self,
p_create_info: *const vk::ShaderInstrumentationCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_instrumentation: *mut vk::ShaderInstrumentationARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_shader_instrumentation_arm(self, p_create_info, p_allocator, p_instrumentation)
}
}
}
/// Call `vkDestroyShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_shader_instrumentation_arm(
device: &Device,
instrumentation: vk::ShaderInstrumentationARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_shader_instrumentation_arm
.ok_or(CallError::MissingCommand(
"vkDestroyShaderInstrumentationARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), instrumentation, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_shader_instrumentation_arm(
&self,
instrumentation: vk::ShaderInstrumentationARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_shader_instrumentation_arm(self, instrumentation, p_allocator) }
}
}
/// Call `vkCmdBeginShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_shader_instrumentation_arm(
device: &Device,
command_buffer: vk::CommandBuffer,
instrumentation: vk::ShaderInstrumentationARM,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_begin_shader_instrumentation_arm
.ok_or(CallError::MissingCommand(
"vkCmdBeginShaderInstrumentationARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, instrumentation) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_shader_instrumentation_arm(
&self,
command_buffer: vk::CommandBuffer,
instrumentation: vk::ShaderInstrumentationARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_begin_shader_instrumentation_arm(self, command_buffer, instrumentation) }
}
}
/// Call `vkCmdEndShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_shader_instrumentation_arm(
device: &Device,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_end_shader_instrumentation_arm
.ok_or(CallError::MissingCommand(
"vkCmdEndShaderInstrumentationARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer) };
Ok(())
}
impl Device {
/// Call `vkCmdEndShaderInstrumentationARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndShaderInstrumentationARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_shader_instrumentation_arm(
&self,
command_buffer: vk::CommandBuffer,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_end_shader_instrumentation_arm(self, command_buffer) }
}
}
/// Call `vkGetShaderInstrumentationValuesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderInstrumentationValuesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_shader_instrumentation_values_arm(
device: &Device,
instrumentation: vk::ShaderInstrumentationARM,
p_metric_block_count: *mut u32,
p_metric_values: *mut std::ffi::c_void,
flags: vk::ShaderInstrumentationValuesFlagsARM,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_shader_instrumentation_values_arm
.ok_or(CallError::MissingCommand(
"vkGetShaderInstrumentationValuesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
instrumentation,
p_metric_block_count,
p_metric_values,
flags,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetShaderInstrumentationValuesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetShaderInstrumentationValuesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_shader_instrumentation_values_arm(
&self,
instrumentation: vk::ShaderInstrumentationARM,
p_metric_block_count: *mut u32,
p_metric_values: *mut std::ffi::c_void,
flags: vk::ShaderInstrumentationValuesFlagsARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_shader_instrumentation_values_arm(
self,
instrumentation,
p_metric_block_count,
p_metric_values,
flags,
)
}
}
}
/// Call `vkClearShaderInstrumentationMetricsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkClearShaderInstrumentationMetricsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn clear_shader_instrumentation_metrics_arm(
device: &Device,
instrumentation: vk::ShaderInstrumentationARM,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.clear_shader_instrumentation_metrics_arm
.ok_or(CallError::MissingCommand(
"vkClearShaderInstrumentationMetricsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), instrumentation) };
Ok(())
}
impl Device {
/// Call `vkClearShaderInstrumentationMetricsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkClearShaderInstrumentationMetricsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn clear_shader_instrumentation_metrics_arm(
&self,
instrumentation: vk::ShaderInstrumentationARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { clear_shader_instrumentation_metrics_arm(self, instrumentation) }
}
}
/// Call `vkCreateTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_tensor_arm(
device: &Device,
p_create_info: *const vk::TensorCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_tensor: *mut vk::TensorARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_tensor_arm
.ok_or(CallError::MissingCommand("vkCreateTensorARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_tensor) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_tensor_arm(
&self,
p_create_info: *const vk::TensorCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_tensor: *mut vk::TensorARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_tensor_arm(self, p_create_info, p_allocator, p_tensor) }
}
}
/// Call `vkDestroyTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_tensor_arm(
device: &Device,
tensor: vk::TensorARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_tensor_arm
.ok_or(CallError::MissingCommand("vkDestroyTensorARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), tensor, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_tensor_arm(
&self,
tensor: vk::TensorARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_tensor_arm(self, tensor, p_allocator) }
}
}
/// Call `vkCreateTensorViewARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateTensorViewARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_tensor_view_arm(
device: &Device,
p_create_info: *const vk::TensorViewCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_view: *mut vk::TensorViewARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_tensor_view_arm
.ok_or(CallError::MissingCommand("vkCreateTensorViewARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_view) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateTensorViewARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateTensorViewARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_tensor_view_arm(
&self,
p_create_info: *const vk::TensorViewCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_view: *mut vk::TensorViewARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_tensor_view_arm(self, p_create_info, p_allocator, p_view) }
}
}
/// Call `vkDestroyTensorViewARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyTensorViewARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_tensor_view_arm(
device: &Device,
tensor_view: vk::TensorViewARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.destroy_tensor_view_arm
.ok_or(CallError::MissingCommand("vkDestroyTensorViewARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), tensor_view, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyTensorViewARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyTensorViewARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_tensor_view_arm(
&self,
tensor_view: vk::TensorViewARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_tensor_view_arm(self, tensor_view, p_allocator) }
}
}
/// Call `vkGetTensorMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_tensor_memory_requirements_arm(
device: &Device,
p_info: *const vk::TensorMemoryRequirementsInfoARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.get_tensor_memory_requirements_arm
.ok_or(CallError::MissingCommand(
"vkGetTensorMemoryRequirementsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetTensorMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_tensor_memory_requirements_arm(
&self,
p_info: *const vk::TensorMemoryRequirementsInfoARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_tensor_memory_requirements_arm(self, p_info, p_memory_requirements) }
}
}
/// Call `vkBindTensorMemoryARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindTensorMemoryARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn bind_tensor_memory_arm(
device: &Device,
bind_info_count: u32,
p_bind_infos: *const vk::BindTensorMemoryInfoARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.bind_tensor_memory_arm
.ok_or(CallError::MissingCommand("vkBindTensorMemoryARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, p_bind_infos) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBindTensorMemoryARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindTensorMemoryARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn bind_tensor_memory_arm(
&self,
bind_info_count: u32,
p_bind_infos: *const vk::BindTensorMemoryInfoARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_tensor_memory_arm(self, bind_info_count, p_bind_infos) }
}
}
/// Call `vkGetDeviceTensorMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceTensorMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_device_tensor_memory_requirements_arm(
device: &Device,
p_info: *const vk::DeviceTensorMemoryRequirementsARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_device_tensor_memory_requirements_arm
.ok_or(CallError::MissingCommand(
"vkGetDeviceTensorMemoryRequirementsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDeviceTensorMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDeviceTensorMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_device_tensor_memory_requirements_arm(
&self,
p_info: *const vk::DeviceTensorMemoryRequirementsARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_device_tensor_memory_requirements_arm(self, p_info, p_memory_requirements) }
}
}
/// Call `vkCmdCopyTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_tensor_arm(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_tensor_info: *const vk::CopyTensorInfoARM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_tensor_arm
.ok_or(CallError::MissingCommand("vkCmdCopyTensorARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_tensor_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyTensorARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyTensorARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_tensor_arm(
&self,
command_buffer: vk::CommandBuffer,
p_copy_tensor_info: *const vk::CopyTensorInfoARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_tensor_arm(self, command_buffer, p_copy_tensor_info) }
}
}
/// Call `vkGetTensorOpaqueCaptureDescriptorDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorOpaqueCaptureDescriptorDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_tensor_opaque_capture_descriptor_data_arm(
device: &Device,
p_info: *const vk::TensorCaptureDescriptorDataInfoARM,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_tensor_opaque_capture_descriptor_data_arm
.ok_or(CallError::MissingCommand(
"vkGetTensorOpaqueCaptureDescriptorDataARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetTensorOpaqueCaptureDescriptorDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorOpaqueCaptureDescriptorDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_tensor_opaque_capture_descriptor_data_arm(
&self,
p_info: *const vk::TensorCaptureDescriptorDataInfoARM,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_tensor_opaque_capture_descriptor_data_arm(self, p_info, p_data) }
}
}
/// Call `vkGetTensorViewOpaqueCaptureDescriptorDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorViewOpaqueCaptureDescriptorDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_tensor_view_opaque_capture_descriptor_data_arm(
device: &Device,
p_info: *const vk::TensorViewCaptureDescriptorDataInfoARM,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_tensor_view_opaque_capture_descriptor_data_arm
.ok_or(CallError::MissingCommand(
"vkGetTensorViewOpaqueCaptureDescriptorDataARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_data) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetTensorViewOpaqueCaptureDescriptorDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorViewOpaqueCaptureDescriptorDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_tensor_view_opaque_capture_descriptor_data_arm(
&self,
p_info: *const vk::TensorViewCaptureDescriptorDataInfoARM,
p_data: *mut std::ffi::c_void,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_tensor_view_opaque_capture_descriptor_data_arm(self, p_info, p_data) }
}
}
/// Call `vkGetPhysicalDeviceExternalTensorPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalTensorPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_external_tensor_properties_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_external_tensor_info: *const vk::PhysicalDeviceExternalTensorInfoARM,
p_external_tensor_properties: *mut vk::ExternalTensorPropertiesARM,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_external_tensor_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceExternalTensorPropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
p_external_tensor_info,
p_external_tensor_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceExternalTensorPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceExternalTensorPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_external_tensor_properties_arm(
&self,
physical_device: vk::PhysicalDevice,
p_external_tensor_info: *const vk::PhysicalDeviceExternalTensorInfoARM,
p_external_tensor_properties: *mut vk::ExternalTensorPropertiesARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_external_tensor_properties_arm(
self,
physical_device,
p_external_tensor_info,
p_external_tensor_properties,
)
}
}
}
/// Call `vkCreateDataGraphPipelinesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDataGraphPipelinesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_data_graph_pipelines_arm(
device: &Device,
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::DataGraphPipelineCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.create_data_graph_pipelines_arm
.ok_or(CallError::MissingCommand("vkCreateDataGraphPipelinesARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
deferred_operation,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateDataGraphPipelinesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDataGraphPipelinesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_data_graph_pipelines_arm(
&self,
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::DataGraphPipelineCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_data_graph_pipelines_arm(
self,
deferred_operation,
pipeline_cache,
create_info_count,
p_create_infos,
p_allocator,
p_pipelines,
)
}
}
}
/// Call `vkCreateDataGraphPipelineSessionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDataGraphPipelineSessionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_data_graph_pipeline_session_arm(
device: &Device,
p_create_info: *const vk::DataGraphPipelineSessionCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_session: *mut vk::DataGraphPipelineSessionARM,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_data_graph_pipeline_session_arm
.ok_or(CallError::MissingCommand(
"vkCreateDataGraphPipelineSessionARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_create_info, p_allocator, p_session) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateDataGraphPipelineSessionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateDataGraphPipelineSessionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_data_graph_pipeline_session_arm(
&self,
p_create_info: *const vk::DataGraphPipelineSessionCreateInfoARM,
p_allocator: *const vk::AllocationCallbacks,
p_session: *mut vk::DataGraphPipelineSessionARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { create_data_graph_pipeline_session_arm(self, p_create_info, p_allocator, p_session) }
}
}
/// Call `vkGetDataGraphPipelineSessionBindPointRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineSessionBindPointRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_data_graph_pipeline_session_bind_point_requirements_arm(
device: &Device,
p_info: *const vk::DataGraphPipelineSessionBindPointRequirementsInfoARM,
p_bind_point_requirement_count: *mut u32,
p_bind_point_requirements: *mut vk::DataGraphPipelineSessionBindPointRequirementARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_data_graph_pipeline_session_bind_point_requirements_arm
.ok_or(CallError::MissingCommand(
"vkGetDataGraphPipelineSessionBindPointRequirementsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_info,
p_bind_point_requirement_count,
p_bind_point_requirements,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDataGraphPipelineSessionBindPointRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineSessionBindPointRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_data_graph_pipeline_session_bind_point_requirements_arm(
&self,
p_info: *const vk::DataGraphPipelineSessionBindPointRequirementsInfoARM,
p_bind_point_requirement_count: *mut u32,
p_bind_point_requirements: *mut vk::DataGraphPipelineSessionBindPointRequirementARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_data_graph_pipeline_session_bind_point_requirements_arm(
self,
p_info,
p_bind_point_requirement_count,
p_bind_point_requirements,
)
}
}
}
/// Call `vkGetDataGraphPipelineSessionMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineSessionMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_data_graph_pipeline_session_memory_requirements_arm(
device: &Device,
p_info: *const vk::DataGraphPipelineSessionMemoryRequirementsInfoARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.get_data_graph_pipeline_session_memory_requirements_arm
.ok_or(CallError::MissingCommand(
"vkGetDataGraphPipelineSessionMemoryRequirementsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), p_info, p_memory_requirements) };
Ok(())
}
impl Device {
/// Call `vkGetDataGraphPipelineSessionMemoryRequirementsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineSessionMemoryRequirementsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_data_graph_pipeline_session_memory_requirements_arm(
&self,
p_info: *const vk::DataGraphPipelineSessionMemoryRequirementsInfoARM,
p_memory_requirements: *mut vk::MemoryRequirements2,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_data_graph_pipeline_session_memory_requirements_arm(self, p_info, p_memory_requirements)
}
}
}
/// Call `vkBindDataGraphPipelineSessionMemoryARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindDataGraphPipelineSessionMemoryARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn bind_data_graph_pipeline_session_memory_arm(
device: &Device,
bind_info_count: u32,
p_bind_infos: *const vk::BindDataGraphPipelineSessionMemoryInfoARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.bind_data_graph_pipeline_session_memory_arm
.ok_or(CallError::MissingCommand(
"vkBindDataGraphPipelineSessionMemoryARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), bind_info_count, p_bind_infos) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkBindDataGraphPipelineSessionMemoryARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkBindDataGraphPipelineSessionMemoryARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn bind_data_graph_pipeline_session_memory_arm(
&self,
bind_info_count: u32,
p_bind_infos: *const vk::BindDataGraphPipelineSessionMemoryInfoARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { bind_data_graph_pipeline_session_memory_arm(self, bind_info_count, p_bind_infos) }
}
}
/// Call `vkDestroyDataGraphPipelineSessionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDataGraphPipelineSessionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn destroy_data_graph_pipeline_session_arm(
device: &Device,
session: vk::DataGraphPipelineSessionARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.destroy_data_graph_pipeline_session_arm
.ok_or(CallError::MissingCommand(
"vkDestroyDataGraphPipelineSessionARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), session, p_allocator) };
Ok(())
}
impl Device {
/// Call `vkDestroyDataGraphPipelineSessionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkDestroyDataGraphPipelineSessionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn destroy_data_graph_pipeline_session_arm(
&self,
session: vk::DataGraphPipelineSessionARM,
p_allocator: *const vk::AllocationCallbacks,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { destroy_data_graph_pipeline_session_arm(self, session, p_allocator) }
}
}
/// Call `vkCmdDispatchDataGraphARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchDataGraphARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_data_graph_arm(
device: &Device,
command_buffer: vk::CommandBuffer,
session: vk::DataGraphPipelineSessionARM,
p_info: *const vk::DataGraphPipelineDispatchInfoARM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_data_graph_arm
.ok_or(CallError::MissingCommand("vkCmdDispatchDataGraphARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, session, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDispatchDataGraphARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchDataGraphARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_data_graph_arm(
&self,
command_buffer: vk::CommandBuffer,
session: vk::DataGraphPipelineSessionARM,
p_info: *const vk::DataGraphPipelineDispatchInfoARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_dispatch_data_graph_arm(self, command_buffer, session, p_info) }
}
}
/// Call `vkGetDataGraphPipelineAvailablePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineAvailablePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_data_graph_pipeline_available_properties_arm(
device: &Device,
p_pipeline_info: *const vk::DataGraphPipelineInfoARM,
p_properties_count: *mut u32,
p_properties: *mut vk::DataGraphPipelinePropertyARM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_data_graph_pipeline_available_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetDataGraphPipelineAvailablePropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_pipeline_info,
p_properties_count,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDataGraphPipelineAvailablePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelineAvailablePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_data_graph_pipeline_available_properties_arm(
&self,
p_pipeline_info: *const vk::DataGraphPipelineInfoARM,
p_properties_count: *mut u32,
p_properties: *mut vk::DataGraphPipelinePropertyARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_data_graph_pipeline_available_properties_arm(
self,
p_pipeline_info,
p_properties_count,
p_properties,
)
}
}
}
/// Call `vkGetDataGraphPipelinePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelinePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_data_graph_pipeline_properties_arm(
device: &Device,
p_pipeline_info: *const vk::DataGraphPipelineInfoARM,
properties_count: u32,
p_properties: *mut vk::DataGraphPipelinePropertyQueryResultARM,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.get_data_graph_pipeline_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetDataGraphPipelinePropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_pipeline_info,
properties_count,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetDataGraphPipelinePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetDataGraphPipelinePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_data_graph_pipeline_properties_arm(
&self,
p_pipeline_info: *const vk::DataGraphPipelineInfoARM,
properties_count: u32,
p_properties: *mut vk::DataGraphPipelinePropertyQueryResultARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_data_graph_pipeline_properties_arm(self, p_pipeline_info, properties_count, p_properties)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_queue_family_data_graph_properties_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_property_count: *mut u32,
p_queue_family_data_graph_properties: *mut vk::QueueFamilyDataGraphPropertiesARM,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_data_graph_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
queue_family_index,
p_queue_family_data_graph_property_count,
p_queue_family_data_graph_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_data_graph_properties_arm(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_property_count: *mut u32,
p_queue_family_data_graph_properties: *mut vk::QueueFamilyDataGraphPropertiesARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_data_graph_properties_arm(
self,
physical_device,
queue_family_index,
p_queue_family_data_graph_property_count,
p_queue_family_data_graph_properties,
)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_queue_family_data_graph_processing_engine_properties_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
p_queue_family_data_graph_processing_engine_info: *const vk::PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM,
p_queue_family_data_graph_processing_engine_properties: *mut vk::QueueFamilyDataGraphProcessingEnginePropertiesARM,
) -> Result<(), CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_data_graph_processing_engine_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
physical_device,
p_queue_family_data_graph_processing_engine_info,
p_queue_family_data_graph_processing_engine_properties,
)
};
Ok(())
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_data_graph_processing_engine_properties_arm(
&self,
physical_device: vk::PhysicalDevice,
p_queue_family_data_graph_processing_engine_info: *const vk::PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM,
p_queue_family_data_graph_processing_engine_properties: *mut vk::QueueFamilyDataGraphProcessingEnginePropertiesARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_data_graph_processing_engine_properties_arm(
self,
physical_device,
p_queue_family_data_graph_processing_engine_info,
p_queue_family_data_graph_processing_engine_properties,
)
}
}
}
#[cfg(feature = "platform-ohos")]
/// Call `vkGetNativeBufferPropertiesOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetNativeBufferPropertiesOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_native_buffer_properties_ohos(
device: &Device,
buffer: *const vk::OH_NativeBuffer,
p_properties: *mut vk::NativeBufferPropertiesOHOS,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_native_buffer_properties_ohos
.ok_or(CallError::MissingCommand("vkGetNativeBufferPropertiesOHOS"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), buffer, p_properties) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ohos")]
impl Device {
/// Call `vkGetNativeBufferPropertiesOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetNativeBufferPropertiesOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_native_buffer_properties_ohos(
&self,
buffer: *const vk::OH_NativeBuffer,
p_properties: *mut vk::NativeBufferPropertiesOHOS,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_native_buffer_properties_ohos(self, buffer, p_properties) }
}
}
#[cfg(feature = "platform-ohos")]
/// Call `vkGetMemoryNativeBufferOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryNativeBufferOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_memory_native_buffer_ohos(
device: &Device,
p_info: *const vk::MemoryGetNativeBufferInfoOHOS,
p_buffer: *mut *mut vk::OH_NativeBuffer,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_memory_native_buffer_ohos
.ok_or(CallError::MissingCommand("vkGetMemoryNativeBufferOHOS"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_info, p_buffer) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
#[cfg(feature = "platform-ohos")]
impl Device {
/// Call `vkGetMemoryNativeBufferOHOS` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetMemoryNativeBufferOHOS` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_memory_native_buffer_ohos(
&self,
p_info: *const vk::MemoryGetNativeBufferInfoOHOS,
p_buffer: *mut *mut vk::OH_NativeBuffer,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_memory_native_buffer_ohos(self, p_info, p_buffer) }
}
}
/// Call `vkQueueSetPerfHintQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSetPerfHintQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn queue_set_perf_hint_qcom(
device: &Device,
queue: vk::Queue,
p_perf_hint_info: *const vk::PerfHintInfoQCOM,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.queue_set_perf_hint_qcom
.ok_or(CallError::MissingCommand("vkQueueSetPerfHintQCOM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(queue, p_perf_hint_info) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkQueueSetPerfHintQCOM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkQueueSetPerfHintQCOM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn queue_set_perf_hint_qcom(
&self,
queue: vk::Queue,
p_perf_hint_info: *const vk::PerfHintInfoQCOM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { queue_set_perf_hint_qcom(self, queue, p_perf_hint_info) }
}
}
/// Call `vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn enumerate_physical_device_queue_family_performance_counters_by_region_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_counter_count: *mut u32,
p_counters: *mut vk::PerformanceCounterARM,
p_counter_descriptions: *mut vk::PerformanceCounterDescriptionARM,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.enumerate_physical_device_queue_family_performance_counters_by_region_arm
.ok_or(CallError::MissingCommand(
"vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
queue_family_index,
p_counter_count,
p_counters,
p_counter_descriptions,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn enumerate_physical_device_queue_family_performance_counters_by_region_arm(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_counter_count: *mut u32,
p_counters: *mut vk::PerformanceCounterARM,
p_counter_descriptions: *mut vk::PerformanceCounterDescriptionARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
enumerate_physical_device_queue_family_performance_counters_by_region_arm(
self,
physical_device,
queue_family_index,
p_counter_count,
p_counters,
p_counter_descriptions,
)
}
}
}
/// Call `vkCmdSetComputeOccupancyPriorityNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetComputeOccupancyPriorityNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_compute_occupancy_priority_nv(
device: &Device,
command_buffer: vk::CommandBuffer,
p_parameters: *const vk::ComputeOccupancyPriorityParametersNV,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_set_compute_occupancy_priority_nv
.ok_or(CallError::MissingCommand(
"vkCmdSetComputeOccupancyPriorityNV",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_parameters) };
Ok(())
}
impl Device {
/// Call `vkCmdSetComputeOccupancyPriorityNV` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetComputeOccupancyPriorityNV` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_compute_occupancy_priority_nv(
&self,
command_buffer: vk::CommandBuffer,
p_parameters: *const vk::ComputeOccupancyPriorityParametersNV,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_compute_occupancy_priority_nv(self, command_buffer, p_parameters) }
}
}
/// Call `vkWriteSamplerDescriptorsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteSamplerDescriptorsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn write_sampler_descriptors_ext(
device: &Device,
sampler_count: u32,
p_samplers: *const vk::SamplerCreateInfo,
p_descriptors: *const vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.write_sampler_descriptors_ext
.ok_or(CallError::MissingCommand("vkWriteSamplerDescriptorsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), sampler_count, p_samplers, p_descriptors) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWriteSamplerDescriptorsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteSamplerDescriptorsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn write_sampler_descriptors_ext(
&self,
sampler_count: u32,
p_samplers: *const vk::SamplerCreateInfo,
p_descriptors: *const vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { write_sampler_descriptors_ext(self, sampler_count, p_samplers, p_descriptors) }
}
}
/// Call `vkWriteResourceDescriptorsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteResourceDescriptorsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn write_resource_descriptors_ext(
device: &Device,
resource_count: u32,
p_resources: *const vk::ResourceDescriptorInfoEXT,
p_descriptors: *const vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.write_resource_descriptors_ext
.ok_or(CallError::MissingCommand("vkWriteResourceDescriptorsEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result =
unsafe { __vk_function(device.handle(), resource_count, p_resources, p_descriptors) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkWriteResourceDescriptorsEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkWriteResourceDescriptorsEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn write_resource_descriptors_ext(
&self,
resource_count: u32,
p_resources: *const vk::ResourceDescriptorInfoEXT,
p_descriptors: *const vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { write_resource_descriptors_ext(self, resource_count, p_resources, p_descriptors) }
}
}
/// Call `vkCmdBindSamplerHeapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindSamplerHeapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_sampler_heap_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_bind_info: *const vk::BindHeapInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_sampler_heap_ext
.ok_or(CallError::MissingCommand("vkCmdBindSamplerHeapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_bind_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindSamplerHeapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindSamplerHeapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_sampler_heap_ext(
&self,
command_buffer: vk::CommandBuffer,
p_bind_info: *const vk::BindHeapInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_sampler_heap_ext(self, command_buffer, p_bind_info) }
}
}
/// Call `vkCmdBindResourceHeapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindResourceHeapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_resource_heap_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_bind_info: *const vk::BindHeapInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_resource_heap_ext
.ok_or(CallError::MissingCommand("vkCmdBindResourceHeapEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_bind_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindResourceHeapEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindResourceHeapEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_resource_heap_ext(
&self,
command_buffer: vk::CommandBuffer,
p_bind_info: *const vk::BindHeapInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_resource_heap_ext(self, command_buffer, p_bind_info) }
}
}
/// Call `vkCmdPushDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_push_data_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_push_data_info: *const vk::PushDataInfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_push_data_ext
.ok_or(CallError::MissingCommand("vkCmdPushDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_push_data_info) };
Ok(())
}
impl Device {
/// Call `vkCmdPushDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdPushDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_push_data_ext(
&self,
command_buffer: vk::CommandBuffer,
p_push_data_info: *const vk::PushDataInfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_push_data_ext(self, command_buffer, p_push_data_info) }
}
}
/// Call `vkRegisterCustomBorderColorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterCustomBorderColorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn register_custom_border_color_ext(
device: &Device,
p_border_color: *const vk::SamplerCustomBorderColorCreateInfoEXT,
request_index: vk::Bool32,
p_index: *mut u32,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.register_custom_border_color_ext
.ok_or(CallError::MissingCommand("vkRegisterCustomBorderColorEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), p_border_color, request_index, p_index) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkRegisterCustomBorderColorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkRegisterCustomBorderColorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn register_custom_border_color_ext(
&self,
p_border_color: *const vk::SamplerCustomBorderColorCreateInfoEXT,
request_index: vk::Bool32,
p_index: *mut u32,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { register_custom_border_color_ext(self, p_border_color, request_index, p_index) }
}
}
/// Call `vkUnregisterCustomBorderColorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnregisterCustomBorderColorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn unregister_custom_border_color_ext(
device: &Device,
index: u32,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.unregister_custom_border_color_ext
.ok_or(CallError::MissingCommand(
"vkUnregisterCustomBorderColorEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(device.handle(), index) };
Ok(())
}
impl Device {
/// Call `vkUnregisterCustomBorderColorEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkUnregisterCustomBorderColorEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn unregister_custom_border_color_ext(&self, index: u32) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { unregister_custom_border_color_ext(self, index) }
}
}
/// Call `vkGetImageOpaqueCaptureDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageOpaqueCaptureDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_image_opaque_capture_data_ext(
device: &Device,
image_count: u32,
p_images: *const vk::Image,
p_datas: *mut vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_image_opaque_capture_data_ext
.ok_or(CallError::MissingCommand("vkGetImageOpaqueCaptureDataEXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), image_count, p_images, p_datas) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetImageOpaqueCaptureDataEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetImageOpaqueCaptureDataEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_image_opaque_capture_data_ext(
&self,
image_count: u32,
p_images: *const vk::Image,
p_datas: *mut vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_image_opaque_capture_data_ext(self, image_count, p_images, p_datas) }
}
}
/// Call `vkGetPhysicalDeviceDescriptorSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDescriptorSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_descriptor_size_ext(
instance: &Instance,
physical_device: vk::PhysicalDevice,
descriptor_type: vk::DescriptorType,
) -> Result<vk::DeviceSize, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_descriptor_size_ext
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceDescriptorSizeEXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(physical_device, descriptor_type) };
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceDescriptorSizeEXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceDescriptorSizeEXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_descriptor_size_ext(
&self,
physical_device: vk::PhysicalDevice,
descriptor_type: vk::DescriptorType,
) -> Result<vk::DeviceSize, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_physical_device_descriptor_size_ext(self, physical_device, descriptor_type) }
}
}
/// Call `vkGetTensorOpaqueCaptureDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorOpaqueCaptureDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_tensor_opaque_capture_data_arm(
device: &Device,
tensor_count: u32,
p_tensors: *const vk::TensorARM,
p_datas: *mut vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
let __vk_function = device
.fp()
.get_tensor_opaque_capture_data_arm
.ok_or(CallError::MissingCommand("vkGetTensorOpaqueCaptureDataARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe { __vk_function(device.handle(), tensor_count, p_tensors, p_datas) };
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkGetTensorOpaqueCaptureDataARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetTensorOpaqueCaptureDataARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_tensor_opaque_capture_data_arm(
&self,
tensor_count: u32,
p_tensors: *const vk::TensorARM,
p_datas: *mut vk::HostAddressRangeEXT,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { get_tensor_opaque_capture_data_arm(self, tensor_count, p_tensors, p_datas) }
}
}
/// Call `vkCmdCopyMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_khr
.ok_or(CallError::MissingCommand("vkCmdCopyMemoryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_memory_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_memory_khr(self, command_buffer, p_copy_memory_info) }
}
}
/// Call `vkCmdCopyMemoryToImageKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_memory_to_image_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryImageInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_memory_to_image_khr
.ok_or(CallError::MissingCommand("vkCmdCopyMemoryToImageKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_memory_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyMemoryToImageKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyMemoryToImageKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_memory_to_image_khr(
&self,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryImageInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_memory_to_image_khr(self, command_buffer, p_copy_memory_info) }
}
}
/// Call `vkCmdCopyImageToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_copy_image_to_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryImageInfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_image_to_memory_khr
.ok_or(CallError::MissingCommand("vkCmdCopyImageToMemoryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_copy_memory_info) };
Ok(())
}
impl Device {
/// Call `vkCmdCopyImageToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyImageToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_copy_image_to_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryImageInfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_copy_image_to_memory_khr(self, command_buffer, p_copy_memory_info) }
}
}
/// Call `vkCmdUpdateMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdateMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_update_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_dst_range: *const vk::DeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
data_size: vk::DeviceSize,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_update_memory_khr
.ok_or(CallError::MissingCommand("vkCmdUpdateMemoryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_dst_range, dst_flags, data_size, p_data) };
Ok(())
}
impl Device {
/// Call `vkCmdUpdateMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdUpdateMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_update_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
p_dst_range: *const vk::DeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
data_size: vk::DeviceSize,
p_data: *const std::ffi::c_void,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_update_memory_khr(
self,
command_buffer,
p_dst_range,
dst_flags,
data_size,
p_data,
)
}
}
}
/// Call `vkCmdFillMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdFillMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_fill_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_dst_range: *const vk::DeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
data: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_fill_memory_khr
.ok_or(CallError::MissingCommand("vkCmdFillMemoryKHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_dst_range, dst_flags, data) };
Ok(())
}
impl Device {
/// Call `vkCmdFillMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdFillMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_fill_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
p_dst_range: *const vk::DeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
data: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_fill_memory_khr(self, command_buffer, p_dst_range, dst_flags, data) }
}
}
/// Call `vkCmdCopyQueryPoolResultsToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyQueryPoolResultsToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
pub unsafe fn cmd_copy_query_pool_results_to_memory_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
p_dst_range: *const vk::StridedDeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
query_result_flags: vk::QueryResultFlags,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_copy_query_pool_results_to_memory_khr
.ok_or(CallError::MissingCommand(
"vkCmdCopyQueryPoolResultsToMemoryKHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
query_pool,
first_query,
query_count,
p_dst_range,
dst_flags,
query_result_flags,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdCopyQueryPoolResultsToMemoryKHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdCopyQueryPoolResultsToMemoryKHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[allow(clippy::too_many_arguments)] // Preserve the native operation's parameter groups.
#[inline]
pub unsafe fn cmd_copy_query_pool_results_to_memory_khr(
&self,
command_buffer: vk::CommandBuffer,
query_pool: vk::QueryPool,
first_query: u32,
query_count: u32,
p_dst_range: *const vk::StridedDeviceAddressRangeKHR,
dst_flags: vk::AddressCommandFlagsKHR,
query_result_flags: vk::QueryResultFlags,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_copy_query_pool_results_to_memory_khr(
self,
command_buffer,
query_pool,
first_query,
query_count,
p_dst_range,
dst_flags,
query_result_flags,
)
}
}
}
/// Call `vkCmdBeginConditionalRendering2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginConditionalRendering2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_conditional_rendering2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_conditional_rendering_begin: *const vk::ConditionalRenderingBeginInfo2EXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_begin_conditional_rendering2_ext
.ok_or(CallError::MissingCommand(
"vkCmdBeginConditionalRendering2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_conditional_rendering_begin) };
Ok(())
}
impl Device {
/// Call `vkCmdBeginConditionalRendering2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginConditionalRendering2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_conditional_rendering2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_conditional_rendering_begin: *const vk::ConditionalRenderingBeginInfo2EXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_conditional_rendering2_ext(self, command_buffer, p_conditional_rendering_begin)
}
}
}
/// Call `vkCmdBindTransformFeedbackBuffers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTransformFeedbackBuffers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_transform_feedback_buffers2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_binding_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_bind_transform_feedback_buffers2_ext
.ok_or(CallError::MissingCommand(
"vkCmdBindTransformFeedbackBuffers2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
p_binding_infos,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindTransformFeedbackBuffers2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindTransformFeedbackBuffers2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_transform_feedback_buffers2_ext(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_binding_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_transform_feedback_buffers2_ext(
self,
command_buffer,
first_binding,
binding_count,
p_binding_infos,
)
}
}
}
/// Call `vkCmdBeginTransformFeedback2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginTransformFeedback2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_begin_transform_feedback2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_counter_range: u32,
counter_range_count: u32,
p_counter_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_begin_transform_feedback2_ext
.ok_or(CallError::MissingCommand("vkCmdBeginTransformFeedback2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_counter_range,
counter_range_count,
p_counter_infos,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBeginTransformFeedback2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBeginTransformFeedback2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_begin_transform_feedback2_ext(
&self,
command_buffer: vk::CommandBuffer,
first_counter_range: u32,
counter_range_count: u32,
p_counter_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_begin_transform_feedback2_ext(
self,
command_buffer,
first_counter_range,
counter_range_count,
p_counter_infos,
)
}
}
}
/// Call `vkCmdEndTransformFeedback2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndTransformFeedback2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_end_transform_feedback2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
first_counter_range: u32,
counter_range_count: u32,
p_counter_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_end_transform_feedback2_ext
.ok_or(CallError::MissingCommand("vkCmdEndTransformFeedback2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_counter_range,
counter_range_count,
p_counter_infos,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdEndTransformFeedback2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdEndTransformFeedback2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_end_transform_feedback2_ext(
&self,
command_buffer: vk::CommandBuffer,
first_counter_range: u32,
counter_range_count: u32,
p_counter_infos: *const vk::BindTransformFeedbackBuffer2InfoEXT,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_end_transform_feedback2_ext(
self,
command_buffer,
first_counter_range,
counter_range_count,
p_counter_infos,
)
}
}
}
/// Call `vkCmdDrawIndirectByteCount2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectByteCount2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_indirect_byte_count2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
instance_count: u32,
first_instance: u32,
p_counter_info: *const vk::BindTransformFeedbackBuffer2InfoEXT,
counter_offset: u32,
vertex_stride: u32,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_byte_count2_ext
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectByteCount2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
instance_count,
first_instance,
p_counter_info,
counter_offset,
vertex_stride,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectByteCount2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectByteCount2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_indirect_byte_count2_ext(
&self,
command_buffer: vk::CommandBuffer,
instance_count: u32,
first_instance: u32,
p_counter_info: *const vk::BindTransformFeedbackBuffer2InfoEXT,
counter_offset: u32,
vertex_stride: u32,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_draw_indirect_byte_count2_ext(
self,
command_buffer,
instance_count,
first_instance,
p_counter_info,
counter_offset,
vertex_stride,
)
}
}
}
/// Call `vkCmdWriteMarkerToMemoryAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteMarkerToMemoryAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_write_marker_to_memory_amd(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::MemoryMarkerInfoAMD,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_write_marker_to_memory_amd
.ok_or(CallError::MissingCommand("vkCmdWriteMarkerToMemoryAMD"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdWriteMarkerToMemoryAMD` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdWriteMarkerToMemoryAMD` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_write_marker_to_memory_amd(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::MemoryMarkerInfoAMD,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_write_marker_to_memory_amd(self, command_buffer, p_info) }
}
}
/// Call `vkCmdBindIndexBuffer3KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer3KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_index_buffer3_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::BindIndexBuffer3InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_index_buffer3_khr
.ok_or(CallError::MissingCommand("vkCmdBindIndexBuffer3KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdBindIndexBuffer3KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindIndexBuffer3KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_index_buffer3_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::BindIndexBuffer3InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_bind_index_buffer3_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCmdBindVertexBuffers3KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers3KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_bind_vertex_buffers3_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_binding_infos: *const vk::BindVertexBuffer3InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_bind_vertex_buffers3_khr
.ok_or(CallError::MissingCommand("vkCmdBindVertexBuffers3KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe {
__vk_function(
command_buffer,
first_binding,
binding_count,
p_binding_infos,
)
};
Ok(())
}
impl Device {
/// Call `vkCmdBindVertexBuffers3KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdBindVertexBuffers3KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_bind_vertex_buffers3_khr(
&self,
command_buffer: vk::CommandBuffer,
first_binding: u32,
binding_count: u32,
p_binding_infos: *const vk::BindVertexBuffer3InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
cmd_bind_vertex_buffers3_khr(
self,
command_buffer,
first_binding,
binding_count,
p_binding_infos,
)
}
}
}
/// Call `vkCmdDrawIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_indirect2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect2_khr
.ok_or(CallError::MissingCommand("vkCmdDrawIndirect2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_indirect2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indirect2_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDrawIndexedIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_indexed_indirect2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indexed_indirect2_khr
.ok_or(CallError::MissingCommand("vkCmdDrawIndexedIndirect2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indexed_indirect2_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDrawIndirectCount2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCount2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_indirect_count2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_indirect_count2_khr
.ok_or(CallError::MissingCommand("vkCmdDrawIndirectCount2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndirectCount2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndirectCount2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_indirect_count2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indirect_count2_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDrawIndexedIndirectCount2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCount2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_indexed_indirect_count2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_indexed_indirect_count2_khr
.ok_or(CallError::MissingCommand(
"vkCmdDrawIndexedIndirectCount2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawIndexedIndirectCount2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawIndexedIndirectCount2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_indexed_indirect_count2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_indexed_indirect_count2_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDrawMeshTasksIndirect2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirect2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_indirect2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_draw_mesh_tasks_indirect2_ext
.ok_or(CallError::MissingCommand("vkCmdDrawMeshTasksIndirect2EXT"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirect2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirect2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirect2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_mesh_tasks_indirect2_ext(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDrawMeshTasksIndirectCount2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCount2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_draw_mesh_tasks_indirect_count2_ext(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
let __vk_function =
device
.fp()
.cmd_draw_mesh_tasks_indirect_count2_ext
.ok_or(CallError::MissingCommand(
"vkCmdDrawMeshTasksIndirectCount2EXT",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDrawMeshTasksIndirectCount2EXT` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDrawMeshTasksIndirectCount2EXT` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_draw_mesh_tasks_indirect_count2_ext(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DrawIndirectCount2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_draw_mesh_tasks_indirect_count2_ext(self, command_buffer, p_info) }
}
}
/// Call `vkCmdDispatchIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_dispatch_indirect2_khr(
device: &Device,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DispatchIndirect2InfoKHR,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_dispatch_indirect2_khr
.ok_or(CallError::MissingCommand("vkCmdDispatchIndirect2KHR"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_info) };
Ok(())
}
impl Device {
/// Call `vkCmdDispatchIndirect2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdDispatchIndirect2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_dispatch_indirect2_khr(
&self,
command_buffer: vk::CommandBuffer,
p_info: *const vk::DispatchIndirect2InfoKHR,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_dispatch_indirect2_khr(self, command_buffer, p_info) }
}
}
/// Call `vkCreateAccelerationStructure2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructure2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn create_acceleration_structure2_khr(
device: &Device,
p_create_info: *const vk::AccelerationStructureCreateInfo2KHR,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureKHR,
) -> Result<vk::Result, CallError> {
let __vk_function =
device
.fp()
.create_acceleration_structure2_khr
.ok_or(CallError::MissingCommand(
"vkCreateAccelerationStructure2KHR",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
device.handle(),
p_create_info,
p_allocator,
p_acceleration_structure,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Device {
/// Call `vkCreateAccelerationStructure2KHR` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCreateAccelerationStructure2KHR` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn create_acceleration_structure2_khr(
&self,
p_create_info: *const vk::AccelerationStructureCreateInfo2KHR,
p_allocator: *const vk::AllocationCallbacks,
p_acceleration_structure: *mut vk::AccelerationStructureKHR,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
create_acceleration_structure2_khr(self, p_create_info, p_allocator, p_acceleration_structure)
}
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_queue_family_data_graph_engine_operation_properties_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_properties: *const vk::QueueFamilyDataGraphPropertiesARM,
p_properties: *mut vk::BaseOutStructure,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_data_graph_engine_operation_properties_arm
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
queue_family_index,
p_queue_family_data_graph_properties,
p_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_data_graph_engine_operation_properties_arm(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_properties: *const vk::QueueFamilyDataGraphPropertiesARM,
p_properties: *mut vk::BaseOutStructure,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_data_graph_engine_operation_properties_arm(
self,
physical_device,
queue_family_index,
p_queue_family_data_graph_properties,
p_properties,
)
}
}
}
/// Call `vkCmdSetDispatchParametersARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDispatchParametersARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn cmd_set_dispatch_parameters_arm(
device: &Device,
command_buffer: vk::CommandBuffer,
p_dispatch_parameters: *const vk::DispatchParametersARM,
) -> Result<(), CallError> {
let __vk_function = device
.fp()
.cmd_set_dispatch_parameters_arm
.ok_or(CallError::MissingCommand("vkCmdSetDispatchParametersARM"))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
unsafe { __vk_function(command_buffer, p_dispatch_parameters) };
Ok(())
}
impl Device {
/// Call `vkCmdSetDispatchParametersARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkCmdSetDispatchParametersARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn cmd_set_dispatch_parameters_arm(
&self,
command_buffer: vk::CommandBuffer,
p_dispatch_parameters: *const vk::DispatchParametersARM,
) -> Result<(), CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe { cmd_set_dispatch_parameters_arm(self, command_buffer, p_dispatch_parameters) }
}
}
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
pub unsafe fn get_physical_device_queue_family_data_graph_optical_flow_image_formats_arm(
instance: &Instance,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_properties: *const vk::QueueFamilyDataGraphPropertiesARM,
p_optical_flow_image_format_info: *const vk::DataGraphOpticalFlowImageFormatInfoARM,
p_format_count: *mut u32,
p_image_format_properties: *mut vk::DataGraphOpticalFlowImageFormatPropertiesARM,
) -> Result<vk::Result, CallError> {
let __vk_function = instance
.fp()
.get_physical_device_queue_family_data_graph_optical_flow_image_formats_arm
.ok_or(CallError::MissingCommand(
"vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM",
))?;
// SAFETY: the caller establishes the native valid-usage contract; argument validity and storage extents follow the documented operation contract.
let result = unsafe {
__vk_function(
physical_device,
queue_family_index,
p_queue_family_data_graph_properties,
p_optical_flow_image_format_info,
p_format_count,
p_image_format_properties,
)
};
if result.is_err() {
return Err(CallError::Vulkan(result));
}
Ok(result)
}
impl Instance {
/// Call `vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM` using this context's cached function pointer.
///
/// # Errors
/// Reports a missing command or a negative native VkResult; non-error results are preserved.
///
/// # Safety
/// The context and all handles must be live and belong to the same Vulkan
/// implementation/device. Meet `vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM` valid usage, enabled API/extension/feature,
/// pointer-chain lifetime, callback compatibility and host/GPU synchronization
/// requirements. Native resources require explicit destruction after completion.
///
/// Preserves native raw pointers, explicit counts, optional nulls and return values.
/// The caller supplies correctly aligned live storage, initialized output-chain
/// headers and every extent implied by native counts, strides or nested records.
/// No allocation, retry, output initialization, ownership transfer or alias fallback
/// occurs in this wrapper. Outputs, including partial outputs on native failure,
/// remain caller-owned and must be inspected/cleaned up according to Vulkan.
#[inline]
pub unsafe fn get_physical_device_queue_family_data_graph_optical_flow_image_formats_arm(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
p_queue_family_data_graph_properties: *const vk::QueueFamilyDataGraphPropertiesARM,
p_optical_flow_image_format_info: *const vk::DataGraphOpticalFlowImageFormatInfoARM,
p_format_count: *mut u32,
p_image_format_properties: *mut vk::DataGraphOpticalFlowImageFormatPropertiesARM,
) -> Result<vk::Result, CallError> {
// SAFETY: the caller provides the canonical operation's native guarantees.
unsafe {
get_physical_device_queue_family_data_graph_optical_flow_image_formats_arm(
self,
physical_device,
queue_family_index,
p_queue_family_data_graph_properties,
p_optical_flow_image_format_info,
p_format_count,
p_image_format_properties,
)
}
}
}