UBO array's will be misaligned if their size isn't a power of 2 #53
Description
I was using the example from lyon, here, and I came across are weird issue. If the Primitive
type's size wasn't a power of 2 (e.g. 16, 32, 64), excluding 4 or 8, the array would be misaligned in the shader, making the first primitive render fine, but subsequent primitives wouldn't.
I created a repo, here, to isolate the problem, with two branches, one showing the problem with the size of 8 bytes, and one working with the size of 32 bytes. There's a comment, here, explaining how to make the 8 byte version work. Similarly, there's a comment, here explaining how to make the 32 byte version stop working.
I've tried Vulkan and DirectX 12, both seeming to be having this issue.
I'm not sure if this is a problem directly with wgpu-rs, or if it's a problem with wgpu, rendy, or gfx-hal, but I'll just post it here, because that's what I'm directly working with.