Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
}
-static void sm6_parser_decode_dx_op(struct sm6_parser *sm6, struct sm6_block *code_block, unsigned int op, +static void sm6_parser_decode_dx_op(struct sm6_parser *sm6, struct sm6_block *code_block, enum dx_intrinsic_opcode op, const char *name, const struct sm6_value **operands, unsigned int operand_count, 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);
- if (op >= ARRAY_SIZE(sm6_dx_op_table) || !sm6_dx_op_table[op].operand_info)
- {
FIXME("Unhandled dx intrinsic function id %u, '%s'.\n", op, name);
return sm6_parser_emit_unhandled(sm6, ins, dst);
- }
- if (sm6_parser_validate_dx_op(sm6, op, operands, operand_count, dst))
So it seems that `name` is only used to check that the function is a DX intrinsic (if it starts with `"dx.op."`) but is otherwise ignored to determine which intrinsic to call (and the first operand is used instead). This sounds pretty funny, you confirm that's intended? Maybe there could be a little comment about that.