• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450
2layout(local_size_x = 1) in;
3
4struct Foo
5{
6	vec3 a; // <- This one should become packed_float3, and the MSL alignment of the struct is now 4.
7	float b;
8};
9
10layout(std140, set = 0, binding = 0) buffer SSBO
11{
12	vec2 a;
13	float b;
14	// <- We expect 4 bytes of padding here since MSL alignment of Foo must be lowered to 4.
15	Foo foo;
16};
17
18void main()
19{
20	a.x = 10.0;
21	b = 20.0;
22}
23