mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
feat(const_eval): impl. acos
This commit is contained in:
parent
12b11f870b
commit
6654c68950
@ -44,6 +44,7 @@ Bottom level categories:
|
||||
- Many numeric built-ins have had a constant evaluation implementation added for them, which allows them to be used in a `const` context:
|
||||
- [#4879](https://github.com/gfx-rs/wgpu/pull/4879) by @ErichDonGubler:
|
||||
- `abs`
|
||||
- `acos`
|
||||
- `cos`
|
||||
- `cosh`
|
||||
- `round`
|
||||
|
@ -819,6 +819,9 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
Scalar::U32([e]) => Ok(Scalar::U32([e])), // TODO: just re-use the expression, ezpz
|
||||
})
|
||||
}
|
||||
crate::MathFunction::Acos => {
|
||||
component_wise_float!(self, span, [arg], |e| { Ok([e.acos()]) })
|
||||
}
|
||||
crate::MathFunction::Pow => self.math_pow(arg, arg1.unwrap(), span),
|
||||
crate::MathFunction::Clamp => {
|
||||
component_wise_scalar!(
|
||||
|
Loading…
Reference in New Issue
Block a user