pub struct Device { /* private fields */ }
Expand description
A logical device.
§Destruction
Dropping this Device
will cause Instance::destroy_device
to be called,
automatically releasing any resources associated with it.
Implementations§
Source§impl Device
impl Device
Sourcepub fn builder<'db>() -> DeviceBuilder<'db>
pub fn builder<'db>() -> DeviceBuilder<'db>
Returns a new DeviceBuilder
.
Sourcepub fn queue(&self, device_queue_index: usize) -> Option<&Queue>
pub fn queue(&self, device_queue_index: usize) -> Option<&Queue>
Returns one of this device’s associated queue.
device_queue_index
does not correspond to the queue family index or
any other index used when creating this device.
Sourcepub fn proc_addr_loader(&self) -> &DeviceProcAddrLoader
pub fn proc_addr_loader(&self) -> &DeviceProcAddrLoader
Returns a reference to the associated DeviceProcAddrLoader
Sourcepub fn handle(&self) -> DeviceHandle
pub fn handle(&self) -> DeviceHandle
Returns the handle for this device.
Sourcepub fn physical_device(&self) -> &PhysicalDevice
pub fn physical_device(&self) -> &PhysicalDevice
Returns a reference to the associated physical device.
Sourcepub fn wait_idle(&self)
pub fn wait_idle(&self)
Waits for this device to become idle.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDeviceWaitIdle.html
Sourcepub fn memory_type_index(
&self,
type_filter: u32,
properties: MemoryPropertyFlags,
) -> VdResult<u32>
pub fn memory_type_index( &self, type_filter: u32, properties: MemoryPropertyFlags, ) -> VdResult<u32>
Returns the memory type index on this device matching the provided type filter and properties.
Sourcepub fn get_device_queue(
&self,
queue_family_index: u32,
queue_index: u32,
) -> Option<QueueHandle>
pub fn get_device_queue( &self, queue_family_index: u32, queue_index: u32, ) -> Option<QueueHandle>
Get a queue handle from a device.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceQueue.html
Sourcepub unsafe fn queue_submit<Q>(
&self,
queue: Q,
submit_info: &[SubmitInfo<'_>],
fence: Option<FenceHandle>,
) -> VdResult<()>where
Q: Handle<Target = QueueHandle>,
pub unsafe fn queue_submit<Q>(
&self,
queue: Q,
submit_info: &[SubmitInfo<'_>],
fence: Option<FenceHandle>,
) -> VdResult<()>where
Q: Handle<Target = QueueHandle>,
Submits a sequence of semaphores or command buffers to a queue.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueSubmit.html
Sourcepub fn queue_wait_idle<Q>(&self, queue: Q)where
Q: Handle<Target = QueueHandle>,
pub fn queue_wait_idle<Q>(&self, queue: Q)where
Q: Handle<Target = QueueHandle>,
Waits for a queue to become idle.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueWaitIdle.html
Sourcepub fn device_wait_idle(&self)
pub fn device_wait_idle(&self)
Waits for this device to become idle.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDeviceWaitIdle.html
Sourcepub unsafe fn allocate_memory(
&self,
allocate_info: &MemoryAllocateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<DeviceMemoryHandle>
pub unsafe fn allocate_memory( &self, allocate_info: &MemoryAllocateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DeviceMemoryHandle>
Allocates GPU memory.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateMemory.html
Sourcepub unsafe fn free_memory(
&self,
memory: DeviceMemoryHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn free_memory( &self, memory: DeviceMemoryHandle, allocator: Option<*const VkAllocationCallbacks>, )
Frees GPU memory.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeMemory.html
Sourcepub unsafe fn map_memory<T>(
&self,
memory: DeviceMemoryHandle,
offset_bytes: u64,
size_bytes: u64,
flags: MemoryMapFlags,
) -> VdResult<*mut T>
pub unsafe fn map_memory<T>( &self, memory: DeviceMemoryHandle, offset_bytes: u64, size_bytes: u64, flags: MemoryMapFlags, ) -> VdResult<*mut T>
Maps a memory object into application address space.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMapMemory.html
Sourcepub unsafe fn unmap_memory(&self, memory: DeviceMemoryHandle)
pub unsafe fn unmap_memory(&self, memory: DeviceMemoryHandle)
Unmaps a previously mapped memory object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUnmapMemory.html
Sourcepub unsafe fn flush_mapped_memory_ranges(
&self,
memory_ranges: &[MappedMemoryRange<'_>],
) -> VdResult<()>
pub unsafe fn flush_mapped_memory_ranges( &self, memory_ranges: &[MappedMemoryRange<'_>], ) -> VdResult<()>
Flushes mapped memory ranges.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFlushMappedMemoryRanges.html
Sourcepub unsafe fn invalidate_mapped_memory_ranges(
&self,
memory_ranges: &[MappedMemoryRange<'_>],
) -> VdResult<()>
pub unsafe fn invalidate_mapped_memory_ranges( &self, memory_ranges: &[MappedMemoryRange<'_>], ) -> VdResult<()>
Invalidates ranges of mapped memory objects.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkInvalidateMappedMemoryRanges.html
Sourcepub unsafe fn get_device_memory_commitment<Dm>(&self, memory: Dm) -> DeviceSizewhere
Dm: Handle<Target = DeviceMemoryHandle>,
pub unsafe fn get_device_memory_commitment<Dm>(&self, memory: Dm) -> DeviceSizewhere
Dm: Handle<Target = DeviceMemoryHandle>,
Queries the current commitment for a VkDeviceMemory.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceMemoryCommitment.html
Sourcepub unsafe fn bind_buffer_memory(
&self,
buffer: BufferHandle,
memory: DeviceMemoryHandle,
memory_offset: DeviceSize,
) -> VdResult<()>
pub unsafe fn bind_buffer_memory( &self, buffer: BufferHandle, memory: DeviceMemoryHandle, memory_offset: DeviceSize, ) -> VdResult<()>
Binds device memory to a buffer object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindBufferMemory.html
Sourcepub unsafe fn bind_image_memory(
&self,
image: ImageHandle,
memory: DeviceMemoryHandle,
memory_offset: DeviceSize,
) -> VdResult<()>
pub unsafe fn bind_image_memory( &self, image: ImageHandle, memory: DeviceMemoryHandle, memory_offset: DeviceSize, ) -> VdResult<()>
Binds device memory to an image object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindImageMemory.html
Sourcepub unsafe fn get_buffer_memory_requirements(
&self,
buffer: BufferHandle,
) -> MemoryRequirements
pub unsafe fn get_buffer_memory_requirements( &self, buffer: BufferHandle, ) -> MemoryRequirements
Returns the memory requirements for specified Vulkan object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetBufferMemoryRequirements.html
Sourcepub unsafe fn get_image_memory_requirements<I>(
&self,
image: I,
) -> MemoryRequirementswhere
I: Handle<Target = ImageHandle>,
pub unsafe fn get_image_memory_requirements<I>(
&self,
image: I,
) -> MemoryRequirementswhere
I: Handle<Target = ImageHandle>,
Returns the memory requirements for specified Vulkan object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageMemoryRequirements.html
Sourcepub unsafe fn get_image_sparse_memory_requirements<I>(
&self,
image: I,
) -> SmallVec<[SparseImageMemoryRequirements; 32]>where
I: Handle<Target = ImageHandle>,
pub unsafe fn get_image_sparse_memory_requirements<I>(
&self,
image: I,
) -> SmallVec<[SparseImageMemoryRequirements; 32]>where
I: Handle<Target = ImageHandle>,
Queries the memory requirements for a sparse image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSparseMemoryRequirements.html
Sourcepub unsafe fn queue_bind_sparse<Q, F>(
&self,
queue: Q,
bind_info: &[BindSparseInfo<'_>],
fence: F,
) -> VdResult<()>
pub unsafe fn queue_bind_sparse<Q, F>( &self, queue: Q, bind_info: &[BindSparseInfo<'_>], fence: F, ) -> VdResult<()>
Binds device memory to a sparse resource object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueBindSparse.html
Sourcepub unsafe fn create_fence(
&self,
create_info: &FenceCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<FenceHandle>
pub unsafe fn create_fence( &self, create_info: &FenceCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<FenceHandle>
Creates a new fence object
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFence.html
Sourcepub unsafe fn destroy_fence(
&self,
fence: FenceHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_fence( &self, fence: FenceHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a fence object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFence.html
Sourcepub unsafe fn reset_fences(&self, fences: &[FenceHandle]) -> VdResult<()>
pub unsafe fn reset_fences(&self, fences: &[FenceHandle]) -> VdResult<()>
Resets one or more fence objects.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetFences.html
Sourcepub unsafe fn get_fence_status<F>(&self, fence: F) -> VdResult<CallResult>where
F: Handle<Target = FenceHandle>,
pub unsafe fn get_fence_status<F>(&self, fence: F) -> VdResult<CallResult>where
F: Handle<Target = FenceHandle>,
Returns the status of a fence.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetFenceStatus.html
Sourcepub unsafe fn wait_for_fences(
&self,
fences: &[FenceHandle],
wait_all: bool,
timeout: u64,
) -> VdResult<()>
pub unsafe fn wait_for_fences( &self, fences: &[FenceHandle], wait_all: bool, timeout: u64, ) -> VdResult<()>
Waits for one or more fences to become signaled.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkWaitForFences.html
Sourcepub unsafe fn create_semaphore(
&self,
create_info: &SemaphoreCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<SemaphoreHandle>
pub unsafe fn create_semaphore( &self, create_info: &SemaphoreCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SemaphoreHandle>
Creates a new queue semaphore object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSemaphore.html
Sourcepub unsafe fn destroy_semaphore(
&self,
shader_module: SemaphoreHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_semaphore( &self, shader_module: SemaphoreHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a semaphore object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySemaphore.html
Sourcepub unsafe fn create_event(
&self,
create_info: &EventCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<EventHandle>
pub unsafe fn create_event( &self, create_info: &EventCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<EventHandle>
Creates a new event object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateEvent.html
Sourcepub unsafe fn destroy_event(
&self,
event: EventHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_event( &self, event: EventHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys an event object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyEvent.html
Sourcepub unsafe fn get_event_status<E>(&self, event: E) -> VdResult<CallResult>where
E: Handle<Target = EventHandle>,
pub unsafe fn get_event_status<E>(&self, event: E) -> VdResult<CallResult>where
E: Handle<Target = EventHandle>,
Retrieves the status of an event object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetEventStatus.html
Sourcepub unsafe fn set_event<E>(&self, event: E) -> VdResult<()>where
E: Handle<Target = EventHandle>,
pub unsafe fn set_event<E>(&self, event: E) -> VdResult<()>where
E: Handle<Target = EventHandle>,
Sets an event to signaled state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkSetEvent.html
Sourcepub unsafe fn reset_event<E>(&self, event: E) -> VdResult<()>where
E: Handle<Target = EventHandle>,
pub unsafe fn reset_event<E>(&self, event: E) -> VdResult<()>where
E: Handle<Target = EventHandle>,
Resets an event to non-signaled state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetEvent.html
Sourcepub unsafe fn create_query_pool(
&self,
create_info: &QueryPoolCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<QueryPoolHandle>
pub unsafe fn create_query_pool( &self, create_info: &QueryPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<QueryPoolHandle>
Creates a new query pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateQueryPool.html
Sourcepub unsafe fn destroy_query_pool(
&self,
query_pool: QueryPoolHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_query_pool( &self, query_pool: QueryPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a query pool object
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyQueryPool.html
Sourcepub unsafe fn get_query_pool_results<Q>(
&self,
query_pool: Q,
first_query: u32,
query_count: u32,
data_size: usize,
data: *mut c_void,
stride: DeviceSize,
flags: QueryResultFlags,
) -> VdResult<()>where
Q: Handle<Target = QueryPoolHandle>,
pub unsafe fn get_query_pool_results<Q>(
&self,
query_pool: Q,
first_query: u32,
query_count: u32,
data_size: usize,
data: *mut c_void,
stride: DeviceSize,
flags: QueryResultFlags,
) -> VdResult<()>where
Q: Handle<Target = QueryPoolHandle>,
Copies results of queries in a query pool to a host memory region
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetQueryPoolResults.html
Sourcepub unsafe fn create_buffer(
&self,
create_info: &BufferCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<BufferHandle>
pub unsafe fn create_buffer( &self, create_info: &BufferCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<BufferHandle>
Creates a new buffer object
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBuffer.html
Sourcepub unsafe fn destroy_buffer(
&self,
buffer: BufferHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_buffer( &self, buffer: BufferHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a buffer object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBuffer.html
Sourcepub unsafe fn create_buffer_view(
&self,
create_info: &BufferViewCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<BufferViewHandle>
pub unsafe fn create_buffer_view( &self, create_info: &BufferViewCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<BufferViewHandle>
Creates a new buffer view object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBufferView.html
Sourcepub unsafe fn destroy_buffer_view(
&self,
buffer_view: BufferViewHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_buffer_view( &self, buffer_view: BufferViewHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a buffer view object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBufferView.html
Sourcepub unsafe fn create_image(
&self,
create_info: &ImageCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<ImageHandle>
pub unsafe fn create_image( &self, create_info: &ImageCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ImageHandle>
Creates a new image object
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImage.html
Sourcepub unsafe fn destroy_image(
&self,
image: ImageHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_image( &self, image: ImageHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys an image object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImage.html
Sourcepub unsafe fn get_image_subresource_layout<I>(
&self,
image: I,
subresource: &ImageSubresource,
) -> SubresourceLayoutwhere
I: Handle<Target = ImageHandle>,
pub unsafe fn get_image_subresource_layout<I>(
&self,
image: I,
subresource: &ImageSubresource,
) -> SubresourceLayoutwhere
I: Handle<Target = ImageHandle>,
Retrieves information about an image subresource.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSubresourceLayout.html
Sourcepub unsafe fn create_image_view(
&self,
create_info: &ImageViewCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<ImageViewHandle>
pub unsafe fn create_image_view( &self, create_info: &ImageViewCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ImageViewHandle>
Creates an image view from an existing image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImageView.html
Sourcepub unsafe fn destroy_image_view(
&self,
image_view: ImageViewHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_image_view( &self, image_view: ImageViewHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys an image view object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImageView.html
Sourcepub unsafe fn create_shader_module(
&self,
create_info: &ShaderModuleCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<ShaderModuleHandle>
pub unsafe fn create_shader_module( &self, create_info: &ShaderModuleCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ShaderModuleHandle>
Creates a new shader module object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateShaderModule.html
Sourcepub unsafe fn destroy_shader_module(
&self,
shader_module: ShaderModuleHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_shader_module( &self, shader_module: ShaderModuleHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a shader module module.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyShaderModule.html
Sourcepub unsafe fn create_pipeline_cache(
&self,
create_info: &PipelineCacheCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<PipelineCacheHandle>
pub unsafe fn create_pipeline_cache( &self, create_info: &PipelineCacheCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<PipelineCacheHandle>
Creates a new pipeline cache
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineCache.html
Sourcepub unsafe fn destroy_pipeline_cache(
&self,
pipeline_cache: PipelineCacheHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_pipeline_cache( &self, pipeline_cache: PipelineCacheHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a pipeline cache object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineCache.html
Sourcepub unsafe fn get_pipeline_cache_data<Pc>(
&self,
pipeline_cache: Pc,
data_size: *mut usize,
data: *mut c_void,
) -> VdResult<()>where
Pc: Handle<Target = PipelineCacheHandle>,
pub unsafe fn get_pipeline_cache_data<Pc>(
&self,
pipeline_cache: Pc,
data_size: *mut usize,
data: *mut c_void,
) -> VdResult<()>where
Pc: Handle<Target = PipelineCacheHandle>,
Gets the data store from a pipeline cache.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPipelineCacheData.html
Sourcepub unsafe fn merge_pipeline_caches<Pc>(
&self,
dst_cache: Pc,
src_caches: &[PipelineCacheHandle],
) -> VdResult<()>where
Pc: Handle<Target = PipelineCacheHandle>,
pub unsafe fn merge_pipeline_caches<Pc>(
&self,
dst_cache: Pc,
src_caches: &[PipelineCacheHandle],
) -> VdResult<()>where
Pc: Handle<Target = PipelineCacheHandle>,
Combines the data stores of pipeline caches.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMergePipelineCaches.html
Sourcepub unsafe fn create_graphics_pipelines(
&self,
pipeline_cache: Option<PipelineCacheHandle>,
create_infos: &[GraphicsPipelineCreateInfo<'_>],
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<SmallVec<[PipelineHandle; 4]>>
pub unsafe fn create_graphics_pipelines( &self, pipeline_cache: Option<PipelineCacheHandle>, create_infos: &[GraphicsPipelineCreateInfo<'_>], allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SmallVec<[PipelineHandle; 4]>>
Creates graphics pipelines.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateGraphicsPipelines.html
Sourcepub unsafe fn create_compute_pipelines(
&self,
pipeline_cache: Option<PipelineCacheHandle>,
create_infos: &[ComputePipelineCreateInfo<'_>],
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<SmallVec<[PipelineHandle; 4]>>
pub unsafe fn create_compute_pipelines( &self, pipeline_cache: Option<PipelineCacheHandle>, create_infos: &[ComputePipelineCreateInfo<'_>], allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SmallVec<[PipelineHandle; 4]>>
Creates a new compute pipeline object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateComputePipelines.html
Sourcepub unsafe fn destroy_pipeline(
&self,
pipeline: PipelineHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_pipeline( &self, pipeline: PipelineHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a pipeline object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipeline.html
Sourcepub unsafe fn create_pipeline_layout(
&self,
create_info: &PipelineLayoutCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<PipelineLayoutHandle>
pub unsafe fn create_pipeline_layout( &self, create_info: &PipelineLayoutCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<PipelineLayoutHandle>
Creates a new pipeline layout object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineLayout.html
Sourcepub unsafe fn destroy_pipeline_layout(
&self,
pipeline_layout: PipelineLayoutHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_pipeline_layout( &self, pipeline_layout: PipelineLayoutHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a pipeline layout object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineLayout.html
Sourcepub unsafe fn create_sampler(
&self,
create_info: &SamplerCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<SamplerHandle>
pub unsafe fn create_sampler( &self, create_info: &SamplerCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SamplerHandle>
Creates a new sampler object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSampler.html
Sourcepub unsafe fn destroy_sampler(
&self,
sampler: SamplerHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_sampler( &self, sampler: SamplerHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a sampler object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySampler.html
Sourcepub unsafe fn create_descriptor_set_layout(
&self,
create_info: &DescriptorSetLayoutCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<DescriptorSetLayoutHandle>
pub unsafe fn create_descriptor_set_layout( &self, create_info: &DescriptorSetLayoutCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DescriptorSetLayoutHandle>
Creates a new descriptor set layout.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorSetLayout.html
Sourcepub unsafe fn destroy_descriptor_set_layout(
&self,
descriptor_set_layout: DescriptorSetLayoutHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_descriptor_set_layout( &self, descriptor_set_layout: DescriptorSetLayoutHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a descriptor set layout object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorSetLayout.html
Sourcepub unsafe fn create_descriptor_pool(
&self,
create_info: &DescriptorPoolCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<DescriptorPoolHandle>
pub unsafe fn create_descriptor_pool( &self, create_info: &DescriptorPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DescriptorPoolHandle>
Creates a descriptor pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorPool.html
Sourcepub unsafe fn destroy_descriptor_pool(
&self,
descriptor_pool: DescriptorPoolHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_descriptor_pool( &self, descriptor_pool: DescriptorPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a descriptor pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorPool.html
Sourcepub unsafe fn reset_descriptor_pool<Dp>(
&self,
descriptor_pool: Dp,
flags: DescriptorPoolResetFlags,
) -> VdResult<()>where
Dp: Handle<Target = DescriptorPoolHandle>,
pub unsafe fn reset_descriptor_pool<Dp>(
&self,
descriptor_pool: Dp,
flags: DescriptorPoolResetFlags,
) -> VdResult<()>where
Dp: Handle<Target = DescriptorPoolHandle>,
Resets a descriptor pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetDescriptorPool.html
Sourcepub unsafe fn allocate_descriptor_sets(
&self,
allocate_info: &DescriptorSetAllocateInfo<'_>,
) -> VdResult<SmallVec<[DescriptorSetHandle; 8]>>
pub unsafe fn allocate_descriptor_sets( &self, allocate_info: &DescriptorSetAllocateInfo<'_>, ) -> VdResult<SmallVec<[DescriptorSetHandle; 8]>>
Allocates one or more descriptor sets.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateDescriptorSets.html
Sourcepub unsafe fn free_descriptor_sets<Dp>(
&self,
descriptor_pool: Dp,
descriptor_sets: &[DescriptorSetHandle],
) -> VdResult<()>where
Dp: Handle<Target = DescriptorPoolHandle>,
pub unsafe fn free_descriptor_sets<Dp>(
&self,
descriptor_pool: Dp,
descriptor_sets: &[DescriptorSetHandle],
) -> VdResult<()>where
Dp: Handle<Target = DescriptorPoolHandle>,
Frees one or more descriptor sets.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeDescriptorSets.html
Sourcepub fn update_descriptor_sets(
&self,
descriptor_writes: &[WriteDescriptorSet<'_>],
descriptor_copies: &[CopyDescriptorSet<'_>],
)
pub fn update_descriptor_sets( &self, descriptor_writes: &[WriteDescriptorSet<'_>], descriptor_copies: &[CopyDescriptorSet<'_>], )
Updates the contents of a descriptor set object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUpdateDescriptorSets.html
Sourcepub unsafe fn create_framebuffer(
&self,
create_info: &FramebufferCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<FramebufferHandle>
pub unsafe fn create_framebuffer( &self, create_info: &FramebufferCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<FramebufferHandle>
Creates a new framebuffer object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFramebuffer.html
Sourcepub unsafe fn destroy_framebuffer(
&self,
framebuffer: FramebufferHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_framebuffer( &self, framebuffer: FramebufferHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a framebuffer object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFramebuffer.html
Sourcepub unsafe fn create_render_pass(
&self,
create_info: &RenderPassCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<RenderPassHandle>
pub unsafe fn create_render_pass( &self, create_info: &RenderPassCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<RenderPassHandle>
Creates a new render pass object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateRenderPass.html
Sourcepub unsafe fn destroy_render_pass(
&self,
render_pass: RenderPassHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_render_pass( &self, render_pass: RenderPassHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a render pass object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyRenderPass.html
Sourcepub unsafe fn get_render_area_granularity<Rp>(
&self,
render_pass: Rp,
) -> Extent2dwhere
Rp: Handle<Target = RenderPassHandle>,
pub unsafe fn get_render_area_granularity<Rp>(
&self,
render_pass: Rp,
) -> Extent2dwhere
Rp: Handle<Target = RenderPassHandle>,
Returns the granularity for optimal render area.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetRenderAreaGranularity.html
Sourcepub unsafe fn create_command_pool(
&self,
create_info: &CommandPoolCreateInfo<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<CommandPoolHandle>
pub unsafe fn create_command_pool( &self, create_info: &CommandPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<CommandPoolHandle>
Creates a new command pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateCommandPool.html
Sourcepub unsafe fn destroy_command_pool(
&self,
command_pool: CommandPoolHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_command_pool( &self, command_pool: CommandPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a command pool object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyCommandPool.html
Sourcepub unsafe fn reset_command_pool<Cp>(
&self,
command_pool: Cp,
flags: CommandPoolResetFlags,
) -> VdResult<()>where
Cp: Handle<Target = CommandPoolHandle>,
pub unsafe fn reset_command_pool<Cp>(
&self,
command_pool: Cp,
flags: CommandPoolResetFlags,
) -> VdResult<()>where
Cp: Handle<Target = CommandPoolHandle>,
Resets a command pool.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandPool.html
Sourcepub unsafe fn allocate_command_buffers(
&self,
allocate_info: &CommandBufferAllocateInfo<'_>,
) -> VdResult<SmallVec<[CommandBufferHandle; 16]>>
pub unsafe fn allocate_command_buffers( &self, allocate_info: &CommandBufferAllocateInfo<'_>, ) -> VdResult<SmallVec<[CommandBufferHandle; 16]>>
Allocates command buffers from an existing command pool.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateCommandBuffers.html
Sourcepub unsafe fn free_command_buffers<Cp>(
&self,
command_pool: Cp,
command_buffers: &[CommandBufferHandle],
)where
Cp: Handle<Target = CommandPoolHandle>,
pub unsafe fn free_command_buffers<Cp>(
&self,
command_pool: Cp,
command_buffers: &[CommandBufferHandle],
)where
Cp: Handle<Target = CommandPoolHandle>,
Frees command buffers.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeCommandBuffers.html
Sourcepub unsafe fn begin_command_buffer(
&self,
command_buffer: CommandBufferHandle,
begin_info: &CommandBufferBeginInfo<'_>,
) -> VdResult<()>
pub unsafe fn begin_command_buffer( &self, command_buffer: CommandBufferHandle, begin_info: &CommandBufferBeginInfo<'_>, ) -> VdResult<()>
Starts recording a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBeginCommandBuffer.html
Sourcepub unsafe fn end_command_buffer(
&self,
command_buffer: CommandBufferHandle,
) -> VdResult<()>
pub unsafe fn end_command_buffer( &self, command_buffer: CommandBufferHandle, ) -> VdResult<()>
Finishes recording a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEndCommandBuffer.html
Sourcepub unsafe fn cmd_reset_command_buffer(
&self,
command_buffer: CommandBufferHandle,
flags: CommandBufferResetFlags,
) -> VdResult<()>
pub unsafe fn cmd_reset_command_buffer( &self, command_buffer: CommandBufferHandle, flags: CommandBufferResetFlags, ) -> VdResult<()>
Resets a command buffer to the initial state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandBuffer.html
Sourcepub unsafe fn cmd_bind_pipeline(
&self,
command_buffer: CommandBufferHandle,
pipeline_bind_point: PipelineBindPoint,
pipeline: PipelineHandle,
)
pub unsafe fn cmd_bind_pipeline( &self, command_buffer: CommandBufferHandle, pipeline_bind_point: PipelineBindPoint, pipeline: PipelineHandle, )
Binds a pipeline object to a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindPipeline.html
Sourcepub unsafe fn cmd_set_viewport(
&self,
command_buffer: CommandBufferHandle,
first_viewport: u32,
viewports: &[Viewport],
)
pub unsafe fn cmd_set_viewport( &self, command_buffer: CommandBufferHandle, first_viewport: u32, viewports: &[Viewport], )
Sets the viewport on a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetViewport.html
Sourcepub unsafe fn cmd_set_scissor(
&self,
command_buffer: CommandBufferHandle,
first_scissor: u32,
scissors: &[Rect2d],
)
pub unsafe fn cmd_set_scissor( &self, command_buffer: CommandBufferHandle, first_scissor: u32, scissors: &[Rect2d], )
Sets the dynamic scissor rectangles on a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetScissor.html
Sourcepub unsafe fn cmd_set_line_width(
&self,
command_buffer: CommandBufferHandle,
line_width: f32,
)
pub unsafe fn cmd_set_line_width( &self, command_buffer: CommandBufferHandle, line_width: f32, )
Sets the dynamic line width state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetLineWidth.html
Sourcepub unsafe fn cmd_set_depth_bias(
&self,
command_buffer: CommandBufferHandle,
depth_bias_constant_factor: f32,
depth_bias_clamp: f32,
depth_bias_slope_factor: f32,
)
pub unsafe fn cmd_set_depth_bias( &self, command_buffer: CommandBufferHandle, depth_bias_constant_factor: f32, depth_bias_clamp: f32, depth_bias_slope_factor: f32, )
Sets the depth bias dynamic state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBias.html
Sourcepub unsafe fn cmd_set_blend_constants(
&self,
command_buffer: CommandBufferHandle,
blend_constants: [f32; 4],
)
pub unsafe fn cmd_set_blend_constants( &self, command_buffer: CommandBufferHandle, blend_constants: [f32; 4], )
Sets the values of blend constants.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetBlendConstants.html
Sourcepub unsafe fn cmd_set_depth_bounds(
&self,
command_buffer: CommandBufferHandle,
min_depth_bounds: f32,
max_depth_bounds: f32,
)
pub unsafe fn cmd_set_depth_bounds( &self, command_buffer: CommandBufferHandle, min_depth_bounds: f32, max_depth_bounds: f32, )
Sets the depth bounds test values for a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBounds.html
Sourcepub unsafe fn cmd_set_stencil_compare_mask(
&self,
command_buffer: CommandBufferHandle,
face_mask: StencilFaceFlags,
compare_mask: u32,
)
pub unsafe fn cmd_set_stencil_compare_mask( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, compare_mask: u32, )
Sets the stencil compare mask dynamic state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilCompareMask.html
Sourcepub unsafe fn cmd_set_stencil_write_mask(
&self,
command_buffer: CommandBufferHandle,
face_mask: StencilFaceFlags,
write_mask: u32,
)
pub unsafe fn cmd_set_stencil_write_mask( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, write_mask: u32, )
Sets the stencil write mask dynamic state
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilWriteMask.html
Sourcepub unsafe fn cmd_set_stencil_reference(
&self,
command_buffer: CommandBufferHandle,
face_mask: StencilFaceFlags,
reference: u32,
)
pub unsafe fn cmd_set_stencil_reference( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, reference: u32, )
Sets the stencil reference dynamic state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilReference.html
Sourcepub unsafe fn cmd_bind_descriptor_sets(
&self,
command_buffer: CommandBufferHandle,
pipeline_bind_point: PipelineBindPoint,
layout: PipelineLayoutHandle,
first_set: u32,
descriptor_sets: &[DescriptorSetHandle],
dynamic_offsets: &[u32],
)
pub unsafe fn cmd_bind_descriptor_sets( &self, command_buffer: CommandBufferHandle, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayoutHandle, first_set: u32, descriptor_sets: &[DescriptorSetHandle], dynamic_offsets: &[u32], )
Binds descriptor sets to a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindDescriptorSets.html
Sourcepub unsafe fn cmd_bind_index_buffer(
&self,
command_buffer: CommandBufferHandle,
buffer: BufferHandle,
offset: u64,
index_type: IndexType,
)
pub unsafe fn cmd_bind_index_buffer( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, index_type: IndexType, )
Binds an index buffer to a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindIndexBuffer.html
Sourcepub unsafe fn cmd_bind_vertex_buffers(
&self,
command_buffer: CommandBufferHandle,
first_binding: u32,
buffers: &[BufferHandle],
offsets: &[u64],
)
pub unsafe fn cmd_bind_vertex_buffers( &self, command_buffer: CommandBufferHandle, first_binding: u32, buffers: &[BufferHandle], offsets: &[u64], )
Binds vertex buffers to a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindVertexBuffers.html
Sourcepub unsafe fn cmd_draw(
&self,
command_buffer: CommandBufferHandle,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32,
)
pub unsafe fn cmd_draw( &self, command_buffer: CommandBufferHandle, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, )
Draws primitives.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDraw.html
Sourcepub unsafe fn cmd_draw_indexed(
&self,
command_buffer: CommandBufferHandle,
index_count: u32,
instance_count: u32,
first_index: u32,
vertex_offset: i32,
first_instance: u32,
)
pub unsafe fn cmd_draw_indexed( &self, command_buffer: CommandBufferHandle, index_count: u32, instance_count: u32, first_index: u32, vertex_offset: i32, first_instance: u32, )
Issues an indexed draw into a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndexed.html
Sourcepub unsafe fn cmd_draw_indirect(
&self,
command_buffer: CommandBufferHandle,
buffer: BufferHandle,
offset: u64,
draw_count: u32,
stride: u32,
)
pub unsafe fn cmd_draw_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, draw_count: u32, stride: u32, )
Issues an indirect draw into a command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndirect.html
Sourcepub unsafe fn cmd_draw_indexed_indirect(
&self,
command_buffer: CommandBufferHandle,
buffer: BufferHandle,
offset: u64,
draw_count: u32,
stride: u32,
)
pub unsafe fn cmd_draw_indexed_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, draw_count: u32, stride: u32, )
Performs an indexed indirect draw.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndexedIndirect.html
Sourcepub unsafe fn cmd_dispatch(
&self,
command_buffer: CommandBufferHandle,
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
)
pub unsafe fn cmd_dispatch( &self, command_buffer: CommandBufferHandle, group_count_x: u32, group_count_y: u32, group_count_z: u32, )
Dispatches compute work items.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDispatch.html
Sourcepub unsafe fn cmd_dispatch_indirect(
&self,
command_buffer: CommandBufferHandle,
buffer: BufferHandle,
offset: u64,
)
pub unsafe fn cmd_dispatch_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, )
Dispatches compute work items using indirect parameters.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDispatchIndirect.html
Sourcepub unsafe fn cmd_copy_buffer(
&self,
command_buffer: CommandBufferHandle,
src_buffer: BufferHandle,
dst_buffer: BufferHandle,
regions: &[BufferCopy],
)
pub unsafe fn cmd_copy_buffer( &self, command_buffer: CommandBufferHandle, src_buffer: BufferHandle, dst_buffer: BufferHandle, regions: &[BufferCopy], )
Copies data between buffer regions.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyBuffer.html
Sourcepub unsafe fn cmd_copy_image(
&self,
command_buffer: CommandBufferHandle,
src_image: ImageHandle,
src_image_layout: ImageLayout,
dst_image: ImageHandle,
dst_image_layout: ImageLayout,
regions: &[ImageCopy],
)
pub unsafe fn cmd_copy_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageCopy], )
Copies data between images.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyImage.html
Sourcepub unsafe fn cmd_blit_image(
&self,
command_buffer: CommandBufferHandle,
src_image: ImageHandle,
src_image_layout: ImageLayout,
dst_image: ImageHandle,
dst_image_layout: ImageLayout,
regions: &[ImageBlit],
filter: Filter,
)
pub unsafe fn cmd_blit_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageBlit], filter: Filter, )
Copies regions of an image, potentially performing format conversion.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBlitImage.html
Sourcepub unsafe fn cmd_copy_buffer_to_image(
&self,
command_buffer: CommandBufferHandle,
src_buffer: BufferHandle,
dst_image: ImageHandle,
dst_image_layout: ImageLayout,
regions: &[BufferImageCopy],
)
pub unsafe fn cmd_copy_buffer_to_image( &self, command_buffer: CommandBufferHandle, src_buffer: BufferHandle, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[BufferImageCopy], )
Copies data from a buffer into an image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyBufferToImage.html
Sourcepub unsafe fn cmd_copy_image_to_buffer(
&self,
command_buffer: CommandBufferHandle,
src_image: ImageHandle,
src_image_layout: ImageLayout,
dst_buffer: BufferHandle,
regions: &[BufferImageCopy],
)
pub unsafe fn cmd_copy_image_to_buffer( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_buffer: BufferHandle, regions: &[BufferImageCopy], )
Copies image data into a buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyImageToBuffer.html
Sourcepub unsafe fn cmd_update_buffer(
&self,
command_buffer: CommandBufferHandle,
dst_buffer: BufferHandle,
dst_offset: u64,
data: &[u8],
)
pub unsafe fn cmd_update_buffer( &self, command_buffer: CommandBufferHandle, dst_buffer: BufferHandle, dst_offset: u64, data: &[u8], )
Updates a buffer’s contents from host memory.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdUpdateBuffer.html
Sourcepub unsafe fn cmd_fill_buffer(
&self,
command_buffer: CommandBufferHandle,
dst_buffer: BufferHandle,
dst_offset: u64,
size: Option<DeviceSize>,
data: u32,
)
pub unsafe fn cmd_fill_buffer( &self, command_buffer: CommandBufferHandle, dst_buffer: BufferHandle, dst_offset: u64, size: Option<DeviceSize>, data: u32, )
Fills a region of a buffer with a fixed value.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdFillBuffer.html
Sourcepub unsafe fn cmd_clear_color_image(
&self,
command_buffer: CommandBufferHandle,
image: ImageHandle,
image_layout: ImageLayout,
color: &ClearColorValue,
ranges: &[ImageSubresourceRange],
)
pub unsafe fn cmd_clear_color_image( &self, command_buffer: CommandBufferHandle, image: ImageHandle, image_layout: ImageLayout, color: &ClearColorValue, ranges: &[ImageSubresourceRange], )
Clears regions of a color image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearColorImage.html
Sourcepub unsafe fn cmd_clear_depth_stencil_image(
&self,
command_buffer: CommandBufferHandle,
image: ImageHandle,
image_layout: ImageLayout,
depth_stencil: &ClearDepthStencilValue,
ranges: &[ImageSubresourceRange],
)
pub unsafe fn cmd_clear_depth_stencil_image( &self, command_buffer: CommandBufferHandle, image: ImageHandle, image_layout: ImageLayout, depth_stencil: &ClearDepthStencilValue, ranges: &[ImageSubresourceRange], )
Fills regions of a combined depth/stencil image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearDepthStencilImage.html
Sourcepub unsafe fn cmd_clear_attachments(
&self,
command_buffer: CommandBufferHandle,
attachments: &[ClearAttachment],
rects: &[ClearRect],
)
pub unsafe fn cmd_clear_attachments( &self, command_buffer: CommandBufferHandle, attachments: &[ClearAttachment], rects: &[ClearRect], )
Clears regions within currently bound framebuffer attachments.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearAttachments.html
Sourcepub unsafe fn cmd_resolve_image(
&self,
command_buffer: CommandBufferHandle,
src_image: ImageHandle,
src_image_layout: ImageLayout,
dst_image: ImageHandle,
dst_image_layout: ImageLayout,
regions: &[ImageResolve],
)
pub unsafe fn cmd_resolve_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageResolve], )
Resolves regions of an image.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResolveImage.html
Sourcepub unsafe fn cmd_set_event(
&self,
command_buffer: CommandBufferHandle,
event: EventHandle,
stage_mask: PipelineStageFlags,
)
pub unsafe fn cmd_set_event( &self, command_buffer: CommandBufferHandle, event: EventHandle, stage_mask: PipelineStageFlags, )
Sets an event object to signaled state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetEvent.html
Sourcepub unsafe fn cmd_reset_event(
&self,
command_buffer: CommandBufferHandle,
event: EventHandle,
stage_mask: PipelineStageFlags,
)
pub unsafe fn cmd_reset_event( &self, command_buffer: CommandBufferHandle, event: EventHandle, stage_mask: PipelineStageFlags, )
Resets an event object to non-signaled state.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResetEvent.html
Sourcepub unsafe fn cmd_wait_events(
&self,
command_buffer: CommandBufferHandle,
events: &[EventHandle],
src_stage_mask: PipelineStageFlags,
dst_stage_mask: PipelineStageFlags,
memory_barriers: &[MemoryBarrier<'_>],
buffer_memory_barriers: &[BufferMemoryBarrier<'_>],
image_memory_barriers: &[ImageMemoryBarrier<'_>],
)
pub unsafe fn cmd_wait_events( &self, command_buffer: CommandBufferHandle, events: &[EventHandle], src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, memory_barriers: &[MemoryBarrier<'_>], buffer_memory_barriers: &[BufferMemoryBarrier<'_>], image_memory_barriers: &[ImageMemoryBarrier<'_>], )
Waits for one or more events and insert a set of memory.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdWaitEvents.html
Sourcepub unsafe fn cmd_pipeline_barrier(
&self,
command_buffer: CommandBufferHandle,
src_stage_mask: PipelineStageFlags,
dst_stage_mask: PipelineStageFlags,
dependency_flags: DependencyFlags,
memory_barriers: &[MemoryBarrier<'_>],
buffer_memory_barriers: &[BufferMemoryBarrier<'_>],
image_memory_barriers: &[ImageMemoryBarrier<'_>],
)
pub unsafe fn cmd_pipeline_barrier( &self, command_buffer: CommandBufferHandle, src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, dependency_flags: DependencyFlags, memory_barriers: &[MemoryBarrier<'_>], buffer_memory_barriers: &[BufferMemoryBarrier<'_>], image_memory_barriers: &[ImageMemoryBarrier<'_>], )
Inserts a memory dependency.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdPipelineBarrier.html
Sourcepub unsafe fn cmd_begin_query(
&self,
command_buffer: CommandBufferHandle,
query_pool: QueryPoolHandle,
query: u32,
flags: QueryControlFlags,
)
pub unsafe fn cmd_begin_query( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, query: u32, flags: QueryControlFlags, )
Begins a query.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBeginQuery.html
Sourcepub unsafe fn cmd_end_query(
&self,
command_buffer: CommandBufferHandle,
query_pool: QueryPoolHandle,
query: u32,
)
pub unsafe fn cmd_end_query( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, query: u32, )
Ends a query.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdEndQuery.html
Sourcepub unsafe fn cmd_reset_query_pool(
&self,
command_buffer: CommandBufferHandle,
query_pool: QueryPoolHandle,
first_query: u32,
query_count: u32,
)
pub unsafe fn cmd_reset_query_pool( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, first_query: u32, query_count: u32, )
Resets queries in a query pool.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResetQueryPool.html
Sourcepub unsafe fn cmd_write_timestamp(
&self,
command_buffer: CommandBufferHandle,
pipeline_stage: PipelineStageFlags,
query_pool: QueryPoolHandle,
query: u32,
)
pub unsafe fn cmd_write_timestamp( &self, command_buffer: CommandBufferHandle, pipeline_stage: PipelineStageFlags, query_pool: QueryPoolHandle, query: u32, )
Writes a device timestamp into a query object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdWriteTimestamp.html
Sourcepub unsafe fn cmd_copy_query_pool_results(
&self,
command_buffer: CommandBufferHandle,
query_pool: QueryPoolHandle,
first_query: u32,
query_count: u32,
dst_buffer: BufferHandle,
dst_offset: u64,
stride: u64,
flags: QueryResultFlags,
)
pub unsafe fn cmd_copy_query_pool_results( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, first_query: u32, query_count: u32, dst_buffer: BufferHandle, dst_offset: u64, stride: u64, flags: QueryResultFlags, )
Copies the results of queries in a query pool to a buffer object.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyQueryPoolResults.html
Sourcepub unsafe fn cmd_push_constants(
&self,
command_buffer: CommandBufferHandle,
layout: PipelineLayoutHandle,
stage_flags: ShaderStageFlags,
offset: u32,
values: &[u8],
)
pub unsafe fn cmd_push_constants( &self, command_buffer: CommandBufferHandle, layout: PipelineLayoutHandle, stage_flags: ShaderStageFlags, offset: u32, values: &[u8], )
Updates the values of push constants.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdPushConstants.html
Sourcepub unsafe fn cmd_begin_render_pass(
&self,
command_buffer: CommandBufferHandle,
render_pass_begin: &RenderPassBeginInfo<'_>,
contents: SubpassContents,
)
pub unsafe fn cmd_begin_render_pass( &self, command_buffer: CommandBufferHandle, render_pass_begin: &RenderPassBeginInfo<'_>, contents: SubpassContents, )
Begins a new render pass.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBeginRenderPass.html
Sourcepub unsafe fn cmd_next_subpass(
&self,
command_buffer: CommandBufferHandle,
contents: SubpassContents,
)
pub unsafe fn cmd_next_subpass( &self, command_buffer: CommandBufferHandle, contents: SubpassContents, )
Transitions to the next subpass of a render pass.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdNextSubpass.html
Sourcepub unsafe fn cmd_end_render_pass(&self, command_buffer: CommandBufferHandle)
pub unsafe fn cmd_end_render_pass(&self, command_buffer: CommandBufferHandle)
Ends the current render pass.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdEndRenderPass.html
Sourcepub unsafe fn cmd_execute_commands(
&self,
command_buffer: CommandBufferHandle,
command_buffers: &[CommandBufferHandle],
)
pub unsafe fn cmd_execute_commands( &self, command_buffer: CommandBufferHandle, command_buffers: &[CommandBufferHandle], )
Executes a secondary command buffer from a primary command buffer.
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdExecuteCommands.html
Sourcepub unsafe fn create_swapchain_khr(
&self,
create_info: &SwapchainCreateInfoKhr<'_>,
allocator: Option<*const VkAllocationCallbacks>,
) -> VdResult<SwapchainKhrHandle>
pub unsafe fn create_swapchain_khr( &self, create_info: &SwapchainCreateInfoKhr<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SwapchainKhrHandle>
Creates a swapchain.
https://manned.org/vkCreateSwapchainKHR.3
Sourcepub unsafe fn destroy_swapchain_khr(
&mut self,
swapchain: SwapchainKhrHandle,
allocator: Option<*const VkAllocationCallbacks>,
)
pub unsafe fn destroy_swapchain_khr( &mut self, swapchain: SwapchainKhrHandle, allocator: Option<*const VkAllocationCallbacks>, )
Destroys a swapchain object.
https://manned.org/vkDestroySwapchainKHR.3
Sourcepub unsafe fn get_swapchain_images_khr(
&self,
swapchain: SwapchainKhrHandle,
) -> VdResult<SmallVec<[ImageHandle; 4]>>
pub unsafe fn get_swapchain_images_khr( &self, swapchain: SwapchainKhrHandle, ) -> VdResult<SmallVec<[ImageHandle; 4]>>
Obtains the array of presentable images associated with a swapchain.
https://manned.org/vkGetSwapchainImagesKHR.3
Sourcepub unsafe fn acquire_next_image_khr(
&self,
swapchain: SwapchainKhrHandle,
timeout: u64,
semaphore: Option<SemaphoreHandle>,
fence: Option<FenceHandle>,
) -> VdResult<u32>
pub unsafe fn acquire_next_image_khr( &self, swapchain: SwapchainKhrHandle, timeout: u64, semaphore: Option<SemaphoreHandle>, fence: Option<FenceHandle>, ) -> VdResult<u32>
Retrieves the index of the next available presentable image.
https://manned.org/vkAcquireNextImageKHR.3
Sourcepub unsafe fn queue_present_khr<Q>(
&self,
queue: Q,
present_info: &PresentInfoKhr<'_>,
) -> VdResult<()>where
Q: Handle<Target = QueueHandle>,
pub unsafe fn queue_present_khr<Q>(
&self,
queue: Q,
present_info: &PresentInfoKhr<'_>,
) -> VdResult<()>where
Q: Handle<Target = QueueHandle>,
Queues an image for presentation.
https://manned.org/vkQueuePresentKHR.3
Creates multiple swapchains that share presentable images.
https://manned.org/vkCreateSharedSwapchainsKHR.3