Oh. Right. I think I knew that at some point but forgot. Sorry for the runaround.
No problem, I am sorry for all the times it has happened to me too. There are... many things to consider at the same time.
I do think that hlsl_type_get_regset() feels conceptually broken, though, and HLSL_REGSET_VOID as well.
Yep, the problem is that in following patches there are many more places where getting rid of `HLSL_REGSET_VOID` would mean having to add a check for if a variable is struct or not (and it can be quite easy to forget to add one). That's why, at first, I just mapped structs to `HLSL_REGSET_NUM` and now `HLSL_REGSET_VOID` serves that purpose.
Also, since now `hlsl_type_calculate_reg_size()` calls `hlsl_type_get_regset()` the latter also has to consider `HLSL_TYPE_PIXELSHADER`, `HLSL_TYPE_VERTEXSHADER`, `HLSL_TYPE_STRING`, and `HLSL_TYPE_VOID` as inputs.
I will keep thinking, maybe there is a better way to implement this, maybe another function that tells whether a type belongs to a single regset or not.