Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
+ struct cf_flattener flattener = {0}; + result = flatten_control_flow_constructs(parser, &flattener); + vkd3d_free(flattener.control_flow_info); + if (result >= 0) + { + vkd3d_free(parser->instructions.elements); + parser->instructions.elements = flattener.instructions; + parser->instructions.capacity = flattener.instruction_capacity; + parser->instructions.count = flattener.instruction_count; + parser->shader_desc.block_count = flattener.block_id; + } + else + { + vkd3d_free(flattener.instructions); + } + } For homogeneity with the other passes, could this be moved to a dedicated function?
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450#note_51488