Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
}
}
+static bool operand_types_match(struct sm6_value *dst, const struct sm6_value **operands, unsigned int operand_count,
char index_char)
+{
- unsigned int i = index_char - '0';
- assert(i < 10);
- if (i >= operand_count)
return false;
- return dst->type == operands[i]->type;
+}
That's fine for me, but I wonder whether using some dedicated char (like `R`, as in "return value") in `operand_info` can be more readable and flexible (just in case, in the future, you have to use it for more than one source operand). I'm not even sure that flexibility is useful for something, so that's just a random thought.