Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
- if (handler_idx == VKD3DSIH_UMUL || handler_idx == VKD3DSIH_UDIV || handler_idx == VKD3DSIH_IDIV)
- {
struct vkd3d_shader_dst_param *dst_params = instruction_dst_params_alloc(ins, 2, sm6);
unsigned int index = code != BINOP_UDIV && code != BINOP_SDIV;
dst_param_init(&dst_params[0]);
dst_param_init(&dst_params[1]);
register_init_ssa_scalar(&dst_params[index].reg, a->type, sm6);
dst_params[index ^ 1].reg.type = VKD3DSPR_NULL;
dst->u.reg = dst_params[index].reg;
- }
- else
- {
instruction_dst_param_init_ssa_scalar(ins, sm6);
- }
This really makes me think that it's time to unlock VSIR from SM4 and let it live its own life. We shouldn't block the MR on this, sure, and separating VSIR and SM4 will probably be a pain because of the disassembler, but I don't think the disassembler should be the main decision factor for an IR.