mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
rename validate_literal to check_literal_value
This commit is contained in:
parent
860c200469
commit
1bb84aef0b
@ -1231,7 +1231,7 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
// expression at a time, `Compose` expressions can only refer to other
|
||||
// expressions, and `ZeroValue` expressions are always okay.
|
||||
if let Expression::Literal(literal) = expr {
|
||||
crate::valid::validate_literal(literal)?;
|
||||
crate::valid::check_literal_value(literal)?;
|
||||
}
|
||||
|
||||
if let Some(FunctionLocalData {
|
||||
|
@ -188,7 +188,7 @@ impl super::Validator {
|
||||
|
||||
match gctx.const_expressions[handle] {
|
||||
E::Literal(literal) => {
|
||||
validate_literal(literal)?;
|
||||
check_literal_value(literal)?;
|
||||
}
|
||||
E::Constant(_) | E::ZeroValue(_) => {}
|
||||
E::Compose { ref components, ty } => {
|
||||
@ -343,7 +343,7 @@ impl super::Validator {
|
||||
ShaderStages::all()
|
||||
}
|
||||
E::Literal(literal) => {
|
||||
validate_literal(literal)?;
|
||||
check_literal_value(literal)?;
|
||||
ShaderStages::all()
|
||||
}
|
||||
E::Constant(_) | E::ZeroValue(_) => ShaderStages::all(),
|
||||
@ -1565,7 +1565,7 @@ impl super::Validator {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn validate_literal(literal: crate::Literal) -> Result<(), LiteralError> {
|
||||
pub fn check_literal_value(literal: crate::Literal) -> Result<(), LiteralError> {
|
||||
let is_nan = match literal {
|
||||
crate::Literal::F64(v) => v.is_nan(),
|
||||
crate::Literal::F32(v) => v.is_nan(),
|
||||
|
@ -24,7 +24,7 @@ use std::ops;
|
||||
use crate::span::{AddSpan as _, WithSpan};
|
||||
pub use analyzer::{ExpressionInfo, FunctionInfo, GlobalUse, Uniformity, UniformityRequirements};
|
||||
pub use compose::ComposeError;
|
||||
pub use expression::{validate_literal, LiteralError};
|
||||
pub use expression::{check_literal_value, LiteralError};
|
||||
pub use expression::{ConstExpressionError, ExpressionError};
|
||||
pub use function::{CallError, FunctionError, LocalVariableError};
|
||||
pub use interface::{EntryPointError, GlobalVariableError, VaryingError};
|
||||
|
Loading…
Reference in New Issue
Block a user