mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
Allow to translate from bool to another type in validator
This commit is contained in:
1 parent
3000232844
commit
7bb28201dd
1 file changed
+1
-14
+1
-14
@@ -1142,20 +1142,7 @@ impl super::Validator {
|
||||
}
|
||||
ShaderStages::all()
|
||||
}
|
||||
E::As {
|
||||
expr,
|
||||
kind,
|
||||
convert,
|
||||
} => {
|
||||
let prev_kind = resolver
|
||||
.resolve(expr)?
|
||||
.scalar_kind()
|
||||
.ok_or(ExpressionError::InvalidCastArgument)?;
|
||||
|
||||
if prev_kind == Sk::Bool || kind == Sk::Bool {
|
||||
return Err(ExpressionError::InvalidCastArgument);
|
||||
}
|
||||
|
||||
E::As { kind, convert, .. } => {
|
||||
match convert {
|
||||
Some(width) if !self.check_width(kind, width) => {
|
||||
return Err(ExpressionError::InvalidCastArgument)
|
||||
|
||||
Reference in new issue
Block a user