Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.c:
static struct hlsl_ir_node *clone_if(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_if *src) {
- struct hlsl_block then_block, else_block; struct hlsl_ir_if *dst;
- if (!(dst = hlsl_new_if(ctx, map_instr(map, src->condition.node), src->node.loc)))
- if (!clone_block(ctx, &then_block, &src->then_block, map))
I get a segfault here on `function-return.shader_test`. I guess it's because you need to init the two blocks. It doesn't look like `clone_block()` does it. Or maybe `clone_block()` should do it, I don't know.