]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/struct_in_anonymous_block.glsl
Clear the empty name flag after emitting a member access
[libs/gl.git] / tests / glsl / struct_in_anonymous_block.glsl
1 struct MaterialParameters
2 {
3         vec4 color;
4 };
5 uniform Material
6 {
7         MaterialParameters material;
8 };
9 uniform Transform
10 {
11         mat4 mvp;
12 };
13
14 #pragma MSP stage(vertex)
15 layout(location=0) in vec4 position;
16 void main()
17 {
18         gl_Position = mvp*position;
19 }
20
21 #pragma MSP stage(fragment)
22 layout(location=0) out vec4 frag_color;
23 void main()
24 {
25         frag_color = material.color;
26 }
27
28 /* Expected output: vertex
29 layout(binding=48) uniform Transform
30 {
31         mat4 mvp;
32 };
33 layout(location=0) in vec4 position;
34 void main()
35 {
36         gl_Position = mvp*position;
37 }
38 */
39
40 /* Expected output: fragment
41 struct MaterialParameters
42 {
43         vec4 color;
44 };
45 layout(binding=64) uniform Material
46 {
47         MaterialParameters material;
48 };
49 layout(location=0) out vec4 frag_color;
50 void main()
51 {
52         frag_color = material.color;
53 }
54 */