Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_codegen.c:
}
static void prepend_input_copy(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_load *lhs,
unsigned int modifiers, const struct hlsl_semantic *semantic)
unsigned int modifiers, const struct hlsl_semantic *semantic, uint32_t semantic_index)
{ struct hlsl_type *type = lhs->node.data_type, *vector_type; struct hlsl_ir_var *var = lhs->src.var;
struct hlsl_ir_constant *c; unsigned int i;
if (type->class == HLSL_CLASS_ARRAY || type->class == HLSL_CLASS_STRUCT)
I don't completely like this control flow structure. I'd rather have `prepend_input_copy()` call one or more times (as appropriate) another helper (like `prepend_single_input_copy()`), rather than reenter itself to pick a different path.