mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
feat(const_eval): impl. trunc
This commit is contained in:
committed by
Teodor Tanasoaia
parent
2d3005b745
commit
18f50092a6
@@ -83,6 +83,7 @@ Bottom level categories:
|
||||
- `radians`
|
||||
- `reverseBits`
|
||||
- `sign`
|
||||
- `trunc`
|
||||
- Eager release of GPU resources comes from device.trackers. By @bradwerth in [#5075](https://github.com/gfx-rs/wgpu/pull/5075)
|
||||
- `wgpu-types`'s `trace` and `replay` features have been replaced by the `serde` feature. By @KirmesBude in [#5149](https://github.com/gfx-rs/wgpu/pull/5149)
|
||||
- `wgpu-core`'s `serial-pass` feature has been removed. Use `serde` instead. By @KirmesBude in [#5149](https://github.com/gfx-rs/wgpu/pull/5149)
|
||||
|
||||
@@ -1014,6 +1014,9 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
Ok([if edge <= x { 1.0 } else { 0.0 }])
|
||||
})
|
||||
}
|
||||
crate::MathFunction::Trunc => {
|
||||
component_wise_float!(self, span, [arg], |e| { Ok([e.trunc()]) })
|
||||
}
|
||||
fun => Err(ConstantEvaluatorError::NotImplemented(format!(
|
||||
"{fun:?} built-in function"
|
||||
))),
|
||||
|
||||
Reference in New Issue
Block a user