Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ const struct parse_initializer *params, + const struct vkd3d_shader_location *loc, bool atan2_mode) +{ + struct hlsl_ir_function_decl *func; + struct hlsl_type *type; + char *header; + char *body; + char *whole_fn; + + static const char* atan2_name = "atan2"; + static const char* atan_name = "atan"; + + static const char* atan2_header_template = + "%s atan2(%s y, %s x)\n" + "{\n" + " %s in_y = y;\n" That's fine for me, but notice that if you want to save some typing `%s` and `type->name` you can move all the declarations at the beginning:
%s in_y, in_x, recip, input, x2, poly_approx, flipped;
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/364#note_57474