[PATCH vkd3d 5/5] vkd3d-shader/hlsl: Correctly calculate offsets for array elements.

Francisco Casas fcasas at codeweavers.com
Mon Feb 28 13:47:10 CST 2022


February 25, 2022 3:11 AM, "Zebediah Figura (she/her)" <zfigura at 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.



More information about the wine-devel mailing list