Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
+ list_add_before(&instr->entry, &c->node.entry); + + if (!(load = hlsl_new_load_index(ctx, &var_deref, &c->node, &instr->loc))) + return false; + list_add_before(&instr->entry, &load->node.entry); + + if (!(load = hlsl_new_load_index(ctx, &load->src, index->idx.node, &instr->loc))) + return false; + list_add_before(&instr->entry, &load->node.entry); + + if (!(store = hlsl_new_store_index(ctx, &row_deref, &c->node, &load->node, 0, &instr->loc))) + return false; + list_add_before(&instr->entry, &store->node.entry); + } + + if (!(load = hlsl_new_load_index(ctx, &row_deref, NULL, &instr->loc))) For convenience this can be hlsl_new_var_load().
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/124#note_27990