There is a difference between matrices in HLSL and GLSL, HLSL matrices are row major, while in GLSL are column major. So the result will be different, you should reoder them in memory on cpu side before fetching. more about differences of HLSL and GLSL can be found here https://community.khronos.org/t/glsl-and-hlsl-differences/53888/4 , as Vulkan uses both.