Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/d3dbc.c:
.has_dst = 1,
.srcs[0].type = D3DSPR_TEMP,
.srcs[0].swizzle = hlsl_swizzle_from_writemask(src1->writemask),
.srcs[0].reg = src1->id,
.srcs[1].type = D3DSPR_TEMP,
.srcs[1].swizzle = hlsl_swizzle_from_writemask(src2->writemask),
.srcs[1].reg = src2->id,
.srcs[2].type = D3DSPR_TEMP,
.srcs[2].swizzle = hlsl_swizzle_from_writemask(src3->writemask),
.srcs[2].reg = src3->id,
.src_count = 3,
- };
- write_sm1_instruction(ctx, buffer, &instr);
+}
I would expect some `sm1_map_src_swizzle()` call at the end, like `write_sm1_unary_op()` and `write_sm1_binary_op()`. Or is `CMP` special for some reason? If not, I would actually rather create the `write_sm1_ternary_op()` helper, similar to the first two, and use that.