feat(const_eval): impl. ceil

This commit is contained in:
Erich Gubler 2024-01-26 12:11:45 -05:00 committed by Teodor Tanasoaia
parent 8afb441ca7
commit a05cc37e3c
3 changed files with 6 additions and 2 deletions

View File

@ -66,6 +66,8 @@ Bottom level categories:
- `step`
- `tan`
- `tanh`
- [#5098](https://github.com/gfx-rs/wgpu/pull/5098) by @ErichDonGubler:
- `ceil`
- 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)

View File

@ -842,6 +842,9 @@ impl<'a> ConstantEvaluator<'a> {
Ok([e1.powf(e2)])
})
}
crate::MathFunction::Ceil => {
component_wise_float!(self, span, [arg], |e| { Ok([e.ceil()]) })
}
crate::MathFunction::Clamp => {
component_wise_scalar!(
self,

View File

@ -8,9 +8,8 @@ uniform highp samplerCube _group_0_binding_0_fs;
void main_1() {
ivec2 sizeCube = ivec2(0);
float a = 0.0;
float a = 1.0;
sizeCube = ivec2(uvec2(textureSize(_group_0_binding_0_fs, 0).xy));
a = ceil(1.0);
return;
}