Skip to content

Commit

Permalink
[naga glsl-in] Fix double overload for dot/reflect/distance/ldexp.
Browse files Browse the repository at this point in the history
The first argument of the `dot`, `reflect`, `distance`, and `ldexp`
GLSL builtin functions may be either a float or a double, and thus the
argument type registered by `inject_common_builtin` must depend on the
`float_width` argument; it cannot simply be `Scalar::F32`.

Introduced by gfx-rs#4673.
  • Loading branch information
jimblandy committed Nov 15, 2023
1 parent cf2405c commit 9210f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion naga/src/front/glsl/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ fn inject_common_builtin(

declaration
.overloads
.push(module.add_builtin(vec![ty(Scalar::F32), ty(second_scalar)], fun))
.push(module.add_builtin(vec![ty(float_scalar), ty(second_scalar)], fun))
}
}
"transpose" => {
Expand Down

0 comments on commit 9210f3e

Please sign in to comment.