Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
+ goto fail; + + if (!vsir_instruction_init_with_params(parser, &instructions[ins_count], &ins->location, VKD3DSIH_BRANCH, 0, 1)) + goto fail; + vsir_src_param_init_label(&instructions[ins_count].src[0], default_label); + ++ins_count; + } + + if (!reserve_instructions(&instructions, &ins_capacity, ins_count + 3 * case_count - 1)) + goto fail; + + for (j = 0; j < case_count; ++j) + { + unsigned int fallthrough_label, case_label = label_from_src_param(&ins->src[3 + 2 * j + 1]); + + if (!vsir_instruction_init_with_params(parser, &instructions[ins_count], &ins->location, VKD3DSIH_IEQ, 1, 2)) While `bool` conditions are not yet implemented for `VKD3DSIH_BRANCH`, perhaps this is a good time to add the `if (src[0].reg.data_type != VKD3D_DATA_BOOL)` to `spirv_compiler_emit_branch()` and use bool here, since we'll need it elsewhere anyway, and it avoids bool-to-int and int-to-bool spam.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/598#note_58992