Realm

vk · Functions · M1

6 public declarations with native signatures and source-owned contracts.

FnRustExperimental

Fnvk::make_api_version

Contract

Pack a Vulkan API version using the Khronos bit allocation.

Khronos reference: VK_MAKE_API_VERSION

Fnvk::map_memory

pub unsafe fn map_memory( device: &Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, flags: MemoryMapFlags, ) -> Result<*mut c_void, CallError>
Map a range of a device memory object into host address space.

Contract

Map a range of a device memory object into host address space.

Returns a raw pointer to the start of the mapped range.

Safety

memory must be host-visible, not already mapped, and remain live until Device::unmap_memory is called.

Khronos reference: vkMapMemory

Fnvk::map_memory2

pub unsafe fn map_memory2( device: &Device, p_memory_map_info: *const MemoryMapInfo<'_>, pp_data: *mut *mut c_void, ) -> Result<Result, CallError>
Call vkMapMemory2 using this context’s cached function pointer.

Contract

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.

Khronos reference: vkMapMemory2

Fnvk::map_memory2_khr

pub unsafe fn map_memory2_khr( device: &Device, p_memory_map_info: *const MemoryMapInfo<'_>, pp_data: *mut *mut c_void, ) -> Result<Result, CallError>
Call vkMapMemory2KHR using this context’s cached function pointer.

Contract

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.

Khronos reference: vkMapMemory2KHR

Fnvk::merge_pipeline_caches

pub unsafe fn merge_pipeline_caches( device: &Device, dst_cache: PipelineCache, src_caches: &[PipelineCache], ) -> Result<(), CallError>
Call vkMergePipelineCaches using this context’s cached function pointer.

Contract

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.

Khronos reference: vkMergePipelineCaches

Fnvk::merge_validation_caches_ext

pub unsafe fn merge_validation_caches_ext( device: &Device, dst_cache: ValidationCacheEXT, src_cache_count: u32, p_src_caches: *const ValidationCacheEXT, ) -> Result<Result, CallError>
Call vkMergeValidationCachesEXT using this context’s cached function pointer.

Contract

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.

Khronos reference: vkMergeValidationCachesEXT