On Fri Apr 21 09:07:42 2023 +0000, Giovanni Mascellani wrote:
What's the advantage of that? I can't say I really like all the `.u` that you have to sprinkle throughout the code.
Being able to pass around hlsl_constant_value directly, mainly, without having to implicitly worry about array size mismatches. There are two places that I want to do this: firstly (what this patch was originally written for) I'd like to pass it to hlsl_new_constant(), to make the function able to return hlsl_ir_node and generally more consistent with other functions; secondly, the sm4_src_from_constant_value() helper introduced in patch 4/5.