Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/tpf.c:
} else {
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref);
enum vkd3d_shader_register_type type = deref->var->indexable ? VKD3DSPR_IDXTEMP : VKD3DSPR_TEMP;
You can compute this inside `sm4_numeric_register_from_deref()`, since `deref` is available there too. I see no real reason for moving it here.