]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/chained_member_access.glsl
Offset layout qualifiers are only allowed on uniform block members
[libs/gl.git] / tests / glsl / chained_member_access.glsl
1 struct TransformComponents
2 {
3         vec3 position;
4         vec3 scale;
5 };
6 struct Transform
7 {
8         TransformComponents components;
9 };
10 uniform ModelData
11 {
12         Transform transform;
13 } model;
14
15 #pragma MSP stage(vertex)
16 layout(location=0) in vec4 position;
17 void main()
18 {
19         gl_Position = vec4(model.transform.components.position+position.xyz*model.transform.components.scale, 1.0);
20 }
21
22 /* Expected output: vertex
23 struct TransformComponents
24 {
25         vec3 position;
26         vec3 scale;
27 };
28 struct Transform
29 {
30         TransformComponents components;
31 };
32 layout(binding=26) uniform ModelData
33 {
34         Transform transform;
35 } model;
36 layout(location=0) in vec4 position;
37 void main()
38 {
39         gl_Position = vec4(model.transform.components.position+position.xyz*model.transform.components.scale, 1.0);
40 }
41 */