[naga glsl-in] Fix double overload for dot/reflect/distance/ldexp.

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 #4673.
This commit is contained in:
Jim Blandy 2023-11-14 09:38:03 -08:00
parent cf2405ca39
commit 324ec4a5ec

View File

@ -1257,7 +1257,7 @@ fn inject_common_builtin(
declaration declaration
.overloads .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" => { "transpose" => {