Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ unsigned int i, j; + + for (i = 0; i < attrs->count; ++i) + { + for (j = i + 1; j < attrs->count; ++j) + { + if (!strcmp(attrs->attrs[i]->name, attrs->attrs[j]->name)) + return true; + } + } + + return false; +} + +static struct list *create_loop(struct hlsl_ctx *ctx, enum loop_type type, const struct parse_attribute_list *attributes, + struct list *init, struct list *cond, struct list *iter, struct list *body, struct vkd3d_shader_location loc) Since you're already rewriting a good chunk of `create_loop()` and all its call sites, please convert the last parameter to `const struct vkd3d_shader_location *loc`. Also, I think `create_loop()` is responsible for freeing `attributes`.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/150#note_29148