Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
return true; }
+static bool intrinsic_reflect(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + struct hlsl_ir_node *i = params->args[0], *n = params->args[1]; + struct hlsl_ir_node *dot, *mul_n, *two_dot, *neg; + + if (!elementwise_intrinsic_float_convert_args(ctx, params, loc)) + return false; + + if (!(dot = add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_DOT, i, n, loc)))
Please use `add_binary_dot_expr()`, which does things properly: it generates a scalar rather than a vector, it errors out on matrix inputs, it generates `HLSL_OP2_MUL` instead of `HLSL_OP2_DOT` when necessary. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/80#note_23080