File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ Naga now infers the correct binding layout when a resource appears only in an as
5858
5959- Removed ` MaintainBase ` in favor of using ` PollType ` . By @waywardmonkeys in [ #7508 ] ( https://github.com/gfx-rs/wgpu/pull/7508 ) .
6060
61+ ### Bug Fixes
62+
63+ #### Naga
64+
65+ - Allow scalars as the first argument of the ` distance ` built-in function. By @bernhl in [ #7530 ] ( https://github.com/gfx-rs/wgpu/pull/7530 ) .
66+
6167## v25.0.1 (2025-04-11)
6268
6369### Bug Fixes
Original file line number Diff line number Diff line change @@ -92,7 +92,9 @@ impl ir::MathFunction {
9292 Mf :: Ldexp => ldexp ( ) . into ( ) ,
9393 Mf :: Outer => outer ( ) . into ( ) ,
9494 Mf :: Cross => regular ! ( 2 , VEC3 of FLOAT ) . into ( ) ,
95- Mf :: Distance => regular ! ( 2 , VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar ) . into ( ) ,
95+ Mf :: Distance => {
96+ regular ! ( 2 , SCALAR |VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar ) . into ( )
97+ }
9698 Mf :: Length => regular ! ( 1 , SCALAR |VECN of FLOAT_ABSTRACT_UNIMPLEMENTED -> Scalar ) . into ( ) ,
9799 Mf :: Normalize => regular ! ( 1 , VECN of FLOAT_ABSTRACT_UNIMPLEMENTED ) . into ( ) ,
98100 Mf :: FaceForward => regular ! ( 3 , VECN of FLOAT_ABSTRACT_UNIMPLEMENTED ) . into ( ) ,
Original file line number Diff line number Diff line change @@ -3419,6 +3419,9 @@ fn too_many_arguments_2() {
34193419 │ ^^^^^^^^ ^^ argument #2 has type `i32`
34203420 │
34213421 = note: `distance` accepts the following types for argument #2:
3422+ = note: allowed type: f32
3423+ = note: allowed type: f16
3424+ = note: allowed type: f64
34223425 = note: allowed type: vec2<f32>
34233426 = note: allowed type: vec2<f16>
34243427 = note: allowed type: vec2<f64>
You can’t perform that action at this time.
0 commit comments