On Tue Jun 20 09:39:47 2023 +0000, Giovanni Mascellani wrote:
Ah, yes, it makes sense. I guess it makes sense to remove the assumption that variables only span a single regset, as much as possible.
To be clear I haven't exactly been trying to say "hlsl_type_get_regset()" shouldn't exist. It makes me uneasy but it does (kind of) have a single definite answer for sm1.
That's not to say that the current code isn't an improvement, but at this point it probably still depends on how we actually deal with variables that have multiple register sets. From the discussion in 209 it's not really clear to me how that's shaking out.
In particular, if we end up moving object fields out of structs and into their own vars, then hlsl_type_get_regset() *does* always have a single, definite answer.