Struct sizes (Windows, pls. compile)

Hallo,

it would be nice if someone with a windows-based C build system could compile, run and post output of the appended code

for win32 and win64 targets. It’s plain to see it just prints struct-sizes of most vulkan structs. The reason I’m asking is to verify my vulkan headers for pascal, and HD-space on my testing windows machine is all eaten up by some recent vulkan-powered RockStar game.

Thank you so much.

abnuto.de/jan/code/test_c.c

The same file can be found at

svn co svn://abnuto.de/vulkan/test

Windows 10, LunarG Vulkan SDK 1.1.101.0

Win64:

PS C:\Users\Ell\Documents\programming\bruns_vulkan_printout\x64\Release> .\bruns_vulkan_printout.exe
8 12 8 12 24 16 24 16 260 520 48 40 64 24 32 24 20 48 8 16 40 12 32 24 24 64 56 56 56 12 16 20 24 56 72 88 40 80 24 40 64 24 24 24 96 68 80 56 68 40 24 32 8 40 40 16 32 48 96 12 16 48 32 24 48 64 48 32 56 32 28 104 144 40 12 48 80 24 32 56 32 16 8 16 24 36 8 72 28 64 24 24 220 20 504 24 32 64 16 20 12 72 48 16 12 24 32 68 64 56 52 8 104 64 32 48 24 40 56 40 24 24 32 48 24 24 24 40 24 16 40 96 40 72 8 16 24 16 24 24 240 32 48 40 40 40 40 24 20 12 24 32 32 32 64 24 24 24 24 24 32 24 32 24 40 32 24 32 24 40 32 32 24 64 72 24 24 24 24 288 24 40 32 40 48 32 24 64 24 152 24 32 56 40 32 24 32 72 8 64 8 40 16 8 32 16 32 24 40 24 12 32 24 72 24 64 32 40 32 88 24 32 32 24 24 24 40 64 24 24 32 24 24 24 64 24 24 24 24 24 40 24 24 24 32 32 8 40 48 48 48 64 48 24 24 40 32 24 40 32 24 40 40 24 32 24 32 72 24 40 56 40 96 32 24 24 56 24 72 32 8 32 24 32 24 24 24 24 32 24 24 24 64 24 24 24 24 32 24 24 24 24 16 32 24 32 12 24 32 24 88 8 40 80 96 40 136 168 40 64 56 32 32 64 16 40 32 40 24 24 32 40 24 272 24 24 24 824 72 520 64 840 536 16 32 32 32 48 40 48
PS C:\Users\Ell\Documents\programming\bruns_vulkan_printout\x64\Release>

Win32:

PS C:\Users\Ell\Documents\programming\bruns_vulkan_printout\Release> .\bruns_vulkan_printout.exe
8 12 8 12 24 16 24 16 260 520 28 24 32 24 24 24 20 48 8 16 32 12 32 24 24 48 48 40 48 12 16 20 16 48 64 68 40 72 24 40 64 16 16 16 48 68 80 56 68 20 20 20 8 24 24 12 16 32 72 12 16 28 20 16 28 52 36 32 44 20 28 96 96 20 12 28 72 16 24 48 16 16 8 16 24 36 8 40 28 36 12 12 220 20 496 12 24 48 16 20 12 36 40 16 12 24 24 68 56 44 52 8 88 32 16 24 12 32 40 28 12 12 24 48 12 12 12 28 24 16 24 72 32 44 8 16 24 16 24 24 228 20 40 28 32 28 28 12 20 12 12 20 20 20 56 12 12 12 16 12 24 12 20 12 32 24 12 20 12 32 24 20 16 32 64 12 12 12 12 144 16 32 16 32 24 20 12 32 16 140 16 24 48 20 16 12 24 56 8 56 8 40 16 8 20 16 20 12 24 12 12 16 16 60 16 48 24 32 24 76 12 24 24 16 16 16 32 56 12 16 24 12 12 16 52 12 12 12 12 12 32 12 12 12 20 20 8 28 32 32 24 40 36 16 12 32 20 16 28 16 12 28 20 16 24 12 20 52 12 32 40 28 48 16 12 16 44 12 64 20 8 16 12 24 12 16 16 12 16 12 12 16 56 16 12 12 12 16 12 16 12 12 8 20 16 24 12 16 20 16 76 8 28 56 88 32 120 144 28 48 40 16 24 56 16 32 16 24 16 12 20 28 16 264 12 12 16 816 40 520 48 824 528 8 16 16 16 24 20 28
PS C:\Users\Ell\Documents\programming\bruns_vulkan_printout\Release>

Great, looks like I get exactly the same sequence from pascal.
The win64 sequence also seems to be the same as on linux64, so it looks like all the compilers agree on how these C structures should be layed out (even though the test didn’t take field offsets into account).

Thanks.