mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[naga] Allow Scalar for MathFunction::Distance (#7530)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
This commit is contained in:
parent
09178f2400
commit
06ee718ddd
@ -58,6 +58,12 @@ Naga now infers the correct binding layout when a resource appears only in an as
|
||||
|
||||
- Removed `MaintainBase` in favor of using `PollType`. By @waywardmonkeys in [#7508](https://github.com/gfx-rs/wgpu/pull/7508).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
#### Naga
|
||||
|
||||
- Allow scalars as the first argument of the `distance` built-in function. By @bernhl in [#7530](https://github.com/gfx-rs/wgpu/pull/7530).
|
||||
|
||||
## v25.0.1 (2025-04-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -92,7 +92,9 @@ impl ir::MathFunction {
|
||||
Mf::Ldexp => ldexp().into(),
|
||||
Mf::Outer => outer().into(),
|
||||
Mf::Cross => regular!(2, VEC3 of FLOAT).into(),
|
||||
Mf::Distance => regular!(2, VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar).into(),
|
||||
Mf::Distance => {
|
||||
regular!(2, SCALAR|VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar).into()
|
||||
}
|
||||
Mf::Length => regular!(1, SCALAR|VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar).into(),
|
||||
Mf::Normalize => regular!(1, VECN of FLOAT_ABSTRACT_UNIMPLEMENTED).into(),
|
||||
Mf::FaceForward => regular!(3, VECN of FLOAT_ABSTRACT_UNIMPLEMENTED).into(),
|
||||
|
||||
@ -3419,6 +3419,9 @@ fn too_many_arguments_2() {
|
||||
│ ^^^^^^^^ ^^ argument #2 has type `i32`
|
||||
│
|
||||
= note: `distance` accepts the following types for argument #2:
|
||||
= note: allowed type: f32
|
||||
= note: allowed type: f16
|
||||
= note: allowed type: f64
|
||||
= note: allowed type: vec2<f32>
|
||||
= note: allowed type: vec2<f16>
|
||||
= note: allowed type: vec2<f64>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user