Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
+ goto fail; + } + else { if (!vsir_instruction_init_with_params(parser, &instructions[ins_count], &ins->location, VKD3DSIH_LABEL, 0, 1)) goto fail; vsir_src_param_init_label(&instructions[ins_count].src[0], ++block_count); ++ins_count; + + if_label = block_count; } } }
+ /* Second subpass: creating new blocks might have broken + * references in PHI instructions, so we use the block map to fix Do validation failures occur without this? AFAIK it's still valid to have a `phi` incoming from the original `switch` block. If block `1` contained the `switch`, block `5` is a switch case, and the conditional branch to `5` could instead branch to a new label `11`, we can still have incomings from `1` and `5`. If control flowed through `5` it gets the second value, otherwise it get the first.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/598#note_58991