]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/constant_last_argument.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / tests / glsl / constant_last_argument.glsl
1 uniform sampler2D tex;
2 layout(push_constant) uniform Transform
3 {
4         mat4 mvp;
5 };
6
7 #pragma MSP stage(vertex)
8 layout(location=0) in vec4 position;
9 layout(location=1) in vec2 texcoord;
10 void main()
11 {
12         gl_Position = mvp*position;
13         passthrough;
14 }
15
16 #pragma MSP stage(fragment)
17 layout(location=0) out vec4 frag_color;
18 void main()
19 {
20         frag_color = textureLod(tex, texcoord, 0.0)*0.8;
21 }
22
23 // Target API: Vulkan
24
25 /* Expected output: vertex
26 layout(push_constant) uniform Transform
27 {
28         mat4 mvp;
29 };
30 layout(location=0) in vec4 position;
31 layout(location=1) in vec2 texcoord;
32 layout(location=0) out vec2 _vs_out_texcoord;
33 void main()
34 {
35         gl_Position = mvp*position;
36         _vs_out_texcoord = texcoord;
37 }
38 */
39
40 /* Expected output: fragment
41 layout(set=0, binding=71) uniform sampler2D tex;
42 layout(location=0) out vec4 frag_color;
43 layout(location=0) in vec2 _vs_out_texcoord;
44 void main()
45 {
46         frag_color = textureLod(tex, _vs_out_texcoord, 0.0)*0.8;
47 }
48 */