mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
feat(const_eval): impl. max
This commit is contained in:
parent
18f50092a6
commit
abcc6ddff3
@ -80,6 +80,7 @@ Bottom level categories:
|
||||
- `inverseSqrt`
|
||||
- `log`
|
||||
- `log2`
|
||||
- `max`
|
||||
- `radians`
|
||||
- `reverseBits`
|
||||
- `sign`
|
||||
|
@ -956,6 +956,11 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
crate::MathFunction::Log2 => {
|
||||
component_wise_float!(self, span, [arg], |e| { Ok([e.log2()]) })
|
||||
}
|
||||
crate::MathFunction::Max => {
|
||||
component_wise_scalar!(self, span, [arg, arg1.unwrap()], |e1, e2| {
|
||||
Ok([e1.max(e2)])
|
||||
})
|
||||
}
|
||||
crate::MathFunction::Radians => {
|
||||
component_wise_float!(self, span, [arg], |e1| { Ok([e1.to_radians()]) })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user