[glsl-out] Mat2xN is Misalligned in Uniform Buffers #2094
Labels
area: back-end
Outputs of shader conversion
kind: bug
Something isn't working
lang: GLSL
OpenGL Shading Language
Found as part of gfx-rs/wgpu#3125
Mat2xN, in uniform buffers, are represented by glsl-out as literal matrices. But because of the spooky alignment at a distance that GLSL does, this actually ends up being the incorrect alignment. Just like HLSL, glsl-out needs to split the matrices into N different vec2s to get the correct alignment.
Test case:
Output GLSL from
naga test.wgsl test.comp --entry-point cs_main
:The text was updated successfully, but these errors were encountered: