mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Allow to translate from bool to another type in validator
This commit is contained in:
committed by
Dzmitry Malyshau
parent
3000232844
commit
7bb28201dd
@@ -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