February 25, 2022 3:11 AM, "Zebediah Figura (she/her)" zfigura@codeweavers.com wrote:
Well, sort of. The "align(element_size, 4)" there is basically an open-coded hlsl_type_get_array_element_reg_size(), and could I guess get replaced with that.
Note that sm4 structs, unlike C structs, never have padding on the end. We should have tests for that in d3dcompiler.
Note also that in sm1, *all* uniforms are aligned to the nearest whole register, and we set reg_size accordingly. So the answer to "does this apply to sm1" is basically "it's a moot point".
Thank you! I understand now.
I should also update the array initializers patch in the same way.
Best regards, Francisco.