PipelinePushConstants

Trait PipelinePushConstants 

Source
pub trait PipelinePushConstants<P: ?Sized> {
    type Repr: Pod;

    const STAGES: ShaderStageFlags;
    const OFFSET: u32;

    // Required method
    fn to_repr(&self) -> Self::Repr;
}
Expand description

Extension trait for push constants, specifying stages, offset and size in the typed pipeline.

This trait is intended to be implemented by proc macro #[derive(Pipeline)] for types marked as #[push].

Required Associated Constants§

Source

const STAGES: ShaderStageFlags

Stage flags for which push constants are enabled.

Source

const OFFSET: u32

Offset of the instance of push constants.

Required Associated Types§

Source

type Repr: Pod

Shader repr type matching push constants layout.

Required Methods§

Source

fn to_repr(&self) -> Self::Repr

Function to convert push constants into correct repr.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§