Clarifying vulkan glsl std140 So I have a uniform block that looks something lile this

{
mat4;
mat4[128];
uint[16]
}

The block should total up to 8320 bytes. After aligning by 256 bytes for nvidia, that brings the total allocation size to 8448 bytes.

However, according to renderdoc and spirv-cross the total block size should be 8512 bytea. Can someone explain to me why there is a 64 byte padding at the end?
The block should total up to 8320 bytes.


No, it shouldn't. You use a uint[16] array. Well, std140 layout makes it clear that the array stride for any array is always rounded up to the stride of a vec4. So that array takes up 256 bytes.

You should instead use a uvec4[4] instead, which you would index from like a multidimensional array.