That should cause compilation to fail, right? (And probably with something like an internal compiler error, because this is something vkd3d-shader itself would trigger.)
Right. We don't want incorrect shaders to compile. I will put ```c ERR("Unhandled register modifier %#x.\n", src->modifiers); vkd3d_unreachable(); ``` then.
The naming here seems a bit unfortunate. As far as I can tell, this function determines the TPF source token count, which isn't a property of the vsir source parameter as such. I.e., I'd expect this to be called something along the lines of "sm4_token_count_from_src_register()", although you could possibly make a case for something like "vsir_src_register_get_tpf_token_count()". (vkd3d_shader_dst_param_order() has that issue as well.)
"sm4_token_count_from_src_register()" sounds good to me, since other static functions in tpf.c start with "sm4_" too. I also renamed vkd3d_shader_dst_param_order().