ComputeCommandEncoder

Struct ComputeCommandEncoder 

Source
pub struct ComputeCommandEncoder<'a> { /* private fields */ }
Expand description

Used to encode command for a compute command buffer.

Implementations§

Source§

impl<'a> ComputeCommandEncoder<'a>

Source

pub unsafe fn bind_pipeline(&self, compute_pipeline: &ComputePipeline)

Binds a pipeline. Vulkan Manual Page

Source

pub unsafe fn bind_descriptor_sets( &self, layout: PipelineLayout, set: u32, descriptor_sets: &[DescriptorSet], dynamic_offsets: &[u32], )

Binds descriptor sets. Vulkan Manual Page

Source

pub unsafe fn push_constants( &self, layout: PipelineLayout, stage_flags: ShaderStageFlags, offset: u32, constants: &[u8], ) -> Result<(), AscheError>

Update the values of push constants. Vulkan Manual Page

Source

pub unsafe fn dispatch( &self, group_count_x: u32, group_count_y: u32, group_count_z: u32, )

Dispatch compute work items. Vulkan Manual Page

Source

pub unsafe fn dispatch_base( &self, base_group_x: u32, base_group_y: u32, base_group_z: u32, group_count_x: u32, group_count_y: u32, group_count_z: u32, )

Dispatch compute work items. Vulkan Manual Page

Source

pub unsafe fn dispatch_indirect(&self, buffer: Buffer, offset: DeviceSize)

Dispatch compute work items using indirect parameters. Vulkan Manual Page

Source

pub unsafe fn build_acceleration_structures( &self, infos: &[AccelerationStructureBuildGeometryInfoKHRBuilder<'_>], build_range_infos: &[AccelerationStructureBuildRangeInfoKHR], )

Build acceleration structures with some parameters provided on the device. Vulkan Manual Page

Source

pub unsafe fn build_acceleration_structures_indirect( &self, infos: &[AccelerationStructureBuildGeometryInfoKHRBuilder<'_>], indirect_device_addresses: &[DeviceAddress], indirect_strides: &[u32], max_primitive_counts: &[*const u32], )

Build an acceleration structure with some parameters provided on the device. Vulkan Manual Page

Source

pub unsafe fn copy_acceleration_structure( &self, info: &CopyAccelerationStructureInfoKHR, )

Copy an acceleration structure. Vulkan Manual Page

Source

pub unsafe fn copy_acceleration_structure_to_memory( &self, info: &CopyAccelerationStructureToMemoryInfoKHR, )

Copy an acceleration structure to device memory. Vulkan Manual Page

Source

pub unsafe fn copy_memory_to_acceleration_structure( &self, info: &CopyMemoryToAccelerationStructureInfoKHR, )

Copy device memory to an acceleration structure. Vulkan Manual Page

Source

pub unsafe fn write_acceleration_structures_properties( &self, acceleration_structures: &[AccelerationStructureKHR], query_type: QueryType, query_pool: QueryPool, first_query: u32, )

Write acceleration structure result parameters to query results. Vulkan Manual Page

Source

pub unsafe fn reset_query_pool( &self, query_pool: QueryPool, first_query: u32, query_count: u32, )

Reset queries in a query pool. Vulkan Manual Page

Source

pub unsafe fn clear_color_image( &self, image: Image, image_layout: ImageLayout, color: &ClearColorValue, ranges: &[ImageSubresourceRangeBuilder<'_>], )

Clear regions of a color image. Vulkan Manual Page

Trait Implementations§

Source§

impl<'a> CommonCommands for ComputeCommandEncoder<'a>

Source§

unsafe fn copy_buffer( &self, src_buffer: Buffer, dst_buffer: Buffer, src_offset: DeviceSize, dst_offset: DeviceSize, size: DeviceSize, )

Copies data between two buffer.

Source§

unsafe fn copy_buffer_to_image( &self, src_buffer: Buffer, dst_image: Image, dst_image_layout: ImageLayout, region: BufferImageCopyBuilder<'_>, )

Copies data from a buffer to an image.

Source§

unsafe fn pipeline_barrier2(&self, dependency_info: &DependencyInfoKHR)

Insert a memory dependency.

Source§

unsafe fn begin_debug_utils_label( &self, label: &str, color: [f32; 4], ) -> Result<(), AscheError>

Insert a memory dependency.

Source§

unsafe fn end_debug_utils_label(&self)

Close a command buffer label region.

Source§

unsafe fn insert_debug_utils_label( &self, label: &str, color: [f32; 4], ) -> Result<(), AscheError>

Insert a label into a command buffer.

Source§

impl<'a> Debug for ComputeCommandEncoder<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Drop for ComputeCommandEncoder<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.