Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
struct vkd3d_shader_instruction *ins, struct sm6_value *dst)
+{
- FIXME("Unhandled dx intrinsic function id %u, '%s'.\n", op, name);
- return sm6_parser_emit_unhandled(sm6, ins, dst);
+}
+static void sm6_parser_emit_call(struct sm6_parser *sm6, const struct dxil_record *record,
struct sm6_block *code_block, struct vkd3d_shader_instruction *ins, struct sm6_value *dst)
+{
- const struct sm6_value *operands[DXIL_OP_MAX_OPERANDS];
- const struct sm6_value *fn_value, *op_value;
- unsigned int i = 1, j, operand_count;
- const struct sm6_type *type = NULL;
- uint64_t call_conv;
- if (!dxil_record_validate_operand_min_count(record, 3, sm6))
Here you require at least 3 operands, but it seems that `record->operands[2]` is only required when `record->operands[1]` has its 16th bit set. Isn't it therefore possible that a call could be made with just two operands?