Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_codegen.c:
list_add_before(&instr->entry, &c->node.entry);
operands[0] = swizzle;
operands[1] = &c->node;
if (!(eq = hlsl_new_expr(ctx, HLSL_OP2_EQUAL, operands,
hlsl_get_vector_type(ctx, HLSL_TYPE_BOOL, type->dimx), &instr->loc)))
return false;
list_add_before(&instr->entry, &eq->entry);
if (!(eq = hlsl_new_cast(ctx, eq, type, &instr->loc)))
return false;
list_add_before(&instr->entry, &eq->entry);
op = HLSL_OP2_DOT;
if (type->dimx == 1)
op = type->base_type == HLSL_TYPE_BOOL ? HLSL_OP2_LOGIC_AND : HLSL_OP2_MUL;
TBH I wouldn't even dislike deciding that `DOT` is defined for scalars, with the obvious semantics. Which might even be my fault if it's not. But no need to further overload this MR with that.