pub struct ShaderModule {
pub(crate) state: ResourceState<ShaderModuleState>,
pub(crate) device: Arc<Device>,
pub(crate) label: String,
pub(crate) compilation_info: CompilationInfo,
}Fields§
§state: ResourceState<ShaderModuleState>§device: Arc<Device>§label: StringThe label from the descriptor used to create the resource.
compilation_info: CompilationInfoImplementations§
Source§impl ShaderModule
impl ShaderModule
pub(crate) fn state(&self) -> Result<&ShaderModuleState, InvalidResourceError>
pub(crate) fn invalid( device: Arc<Device>, label: String, compilation_info: CompilationInfo, ) -> Arc<Self>
pub fn compilation_info(&self) -> &CompilationInfo
Sourcepub(crate) fn finalize_entry_point_name(
&self,
stage: ShaderStage,
entry_point: Option<&str>,
) -> Result<String, StageError>
pub(crate) fn finalize_entry_point_name( &self, stage: ShaderStage, entry_point: Option<&str>, ) -> Result<String, StageError>
Select an entry point name, given an optional name and a shader stage.
This function resolves an Option<&str>
ProgrammableStageDescriptor::entry_point value to the name of an
entry point in self.
If entry_point is given, verify that self has an entry point by that
name for stage, and then return the name as an owned String.
If entry_point is None, verify that self has exactly one entry
point for stage, and return its name.
Passthrough modules do not record entry points’ stages, so for those,
stage is ignored.
Trait Implementations§
Source§impl Debug for ShaderModule
impl Debug for ShaderModule
Source§impl Drop for ShaderModule
impl Drop for ShaderModule
Source§impl Labeled for ShaderModule
impl Labeled for ShaderModule
Source§fn label(&self) -> &str
fn label(&self) -> &str
Returns a string identifying this resource for logging and errors. Read more
fn error_ident(&self) -> ResourceErrorIdent
Source§impl ParentDevice for ShaderModule
impl ParentDevice for ShaderModule
Source§impl ResourceType for ShaderModule
impl ResourceType for ShaderModule
Auto Trait Implementations§
impl Freeze for ShaderModule
impl !RefUnwindSafe for ShaderModule
impl Send for ShaderModule
impl Sync for ShaderModule
impl Unpin for ShaderModule
impl UnsafeUnpin for ShaderModule
impl !UnwindSafe for ShaderModule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more