pub struct Validator { /* private fields */ }Implementations§
Source§impl Validator
impl Validator
pub fn validate_literal(&self, literal: Literal) -> Result<(), LiteralError>
Source§impl Validator
impl Validator
Sourcepub fn new(flags: ValidationFlags, capabilities: Capabilities) -> Self
pub fn new(flags: ValidationFlags, capabilities: Capabilities) -> Self
Create a validator for Naga Modules.
The flags argument indicates which stages of validation the
returned Validator should perform. Skipping stages can make
validation somewhat faster, but the validator may not reject some
invalid modules. Regardless of flags, validation always returns
a usable ModuleInfo value on success.
If flags contains everything in ValidationFlags::default(),
then the returned Naga Validator will reject any Module
that would use capabilities not included in capabilities.
pub fn subgroup_stages(&mut self, stages: ShaderStages) -> &mut Self
pub fn subgroup_operations( &mut self, operations: SubgroupOperationSet, ) -> &mut Self
Sourcepub fn validate(
&mut self,
module: &Module,
) -> Result<ModuleInfo, WithSpan<ValidationError>>
pub fn validate( &mut self, module: &Module, ) -> Result<ModuleInfo, WithSpan<ValidationError>>
Check the given module to be valid.
Sourcepub fn validate_resolved_overrides(
&mut self,
module: &Module,
) -> Result<ModuleInfo, WithSpan<ValidationError>>
pub fn validate_resolved_overrides( &mut self, module: &Module, ) -> Result<ModuleInfo, WithSpan<ValidationError>>
Check the given module to be valid, requiring overrides to be resolved.
This is the same as validate, except that any override
whose value is not a fully-evaluated constant expression is
treated as an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnwindSafe for Validator
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