Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_codegen.c:
+ * the CF instruction, shove it into an if block, and then lower that if + * block. + * + * (We could return a "did we make progress" like transform_ir() and run + * this pass multiple times, but we already know the only block that still + * needs addressing, so there's not much point.) + * + * If we're inside of a loop CF block, we again do things differently. We + * already turned any returns into breaks. If the block we just processed + * was conditional, then "break" did our work for us. If it was a loop, + * we need to propagate that break to the outer loop. + */ + + LIST_FOR_EACH_ENTRY_SAFE(instr, next, &block->instrs, struct hlsl_ir_node, entry) + { + if (instr->type == HLSL_IR_CALL) No strong opinions, but maybe this would be more readable as a `switch` block?
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/85#note_23589