[spv-out] generate LogicalNot for bools

This commit is contained in:
Dzmitry Malyshau committed 2021-04-25 12:57:59 -04:00
1 parent e8c5242cc7
commit f77abdb156
1 file changed
+4 -1
+4 -1
View File
@@ -1575,7 +1575,10 @@ impl Writer {
return Err(Error::FeatureNotImplemented("negation"));
}
},
crate::UnaryOperator::Not => spirv::Op::Not,
crate::UnaryOperator::Not => match expr_ty_inner.scalar_kind() {
Some(crate::ScalarKind::Bool) => spirv::Op::LogicalNot,
_ => spirv::Op::Not,
},
};
block