On Mon Jan 23 19:32:26 2023 +0000, Zebediah Figura wrote:
This feels like the wrong way to go about this. Shouldn't we be deriving this information from the base type? (Note also that type->reg_size should eventually go away...)
It its technically possible but there we would be introducing some redudancy, repeating code in the calculation of the reg_size and in this function.
For instance, we would have to write twice the fact that textures use either the regset S or the regset T, whether we are in SM1 or SM4.
That last thing is also a reason why I am not too inclined to name the regsets HLSL_REGSET_SAMPLERS and HLSL_REGSET_TEXTURES instead of using a single letter (HLSL_REGSET_S and HLSL_REGSET_T) as now.