From 9210f3ec494d4650fe2299fa7e554bcf2886f264 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 14 Nov 2023 09:38:03 -0800 Subject: [PATCH] [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. --- naga/src/front/glsl/builtins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/naga/src/front/glsl/builtins.rs b/naga/src/front/glsl/builtins.rs index 0b01204dac..96e01e21f6 100644 --- a/naga/src/front/glsl/builtins.rs +++ b/naga/src/front/glsl/builtins.rs @@ -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" => {