Struct vulkano::shader::ShaderInterface
source · pub struct ShaderInterface { /* private fields */ }
Expand description
Type that contains the definition of an interface between two shader stages, or between the outside and a shader stage.
Implementations§
source§impl ShaderInterface
impl ShaderInterface
sourcepub unsafe fn new_unchecked(
elements: Vec<ShaderInterfaceEntry>
) -> ShaderInterface
pub unsafe fn new_unchecked(
elements: Vec<ShaderInterfaceEntry>
) -> ShaderInterface
Constructs a new ShaderInterface
.
Safety
- Must only provide one entry per location.
- The format of each element must not be larger than 128 bits.
sourcepub const fn empty() -> ShaderInterface
pub const fn empty() -> ShaderInterface
Creates a description of an empty shader interface.
sourcepub fn elements(&self) -> &[ShaderInterfaceEntry]
pub fn elements(&self) -> &[ShaderInterfaceEntry]
Returns a slice containing the elements of the interface.
sourcepub fn matches(
&self,
other: &ShaderInterface
) -> Result<(), ShaderInterfaceMismatchError>
pub fn matches(
&self,
other: &ShaderInterface
) -> Result<(), ShaderInterfaceMismatchError>
Checks whether the interface is potentially compatible with another one.
Returns Ok
if the two interfaces are compatible.
Trait Implementations§
source§impl Clone for ShaderInterface
impl Clone for ShaderInterface
source§fn clone(&self) -> ShaderInterface
fn clone(&self) -> ShaderInterface
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more