X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tests%2Fglsl%2Fpartially_unused_interface_block.glsl;h=7ccdc0d766c032befdd301a5b4f0176c03644ca3;hb=7563b92050d7c249c9ce848c1310dbfb993eadb7;hp=82b8b1dac0682ed03ec0de362a20abbe61dc1acb;hpb=64b321995acbc4dee1f1be9e17ea161efa0b6bc9;p=libs%2Fgl.git diff --git a/tests/glsl/partially_unused_interface_block.glsl b/tests/glsl/partially_unused_interface_block.glsl index 82b8b1da..7ccdc0d7 100644 --- a/tests/glsl/partially_unused_interface_block.glsl +++ b/tests/glsl/partially_unused_interface_block.glsl @@ -1,3 +1,9 @@ +uniform GlobalValues +{ + vec4 tint; + vec2 scale; +}; + #pragma MSP stage(vertex) layout(location=0) in vec4 position; layout(location=1) in vec4 color; @@ -8,7 +14,7 @@ out VertexOut } vs_out; void main() { - vs_out.texcoord = position.xy*0.5+0.5; + vs_out.texcoord = position.xy*scale*0.5+0.5; vs_out.color = color; gl_Position = position; } @@ -17,10 +23,16 @@ void main() layout(location=0) out vec4 frag_color; void main() { - frag_color = vs_out.color; + scale = vec2(1.0); + frag_color = vs_out.color*tint; } /* Expected output: vertex +layout(binding=72) uniform GlobalValues +{ + vec4 tint; + vec2 scale; +}; layout(location=0) in vec4 position; layout(location=1) in vec4 color; out VertexOut @@ -30,13 +42,18 @@ out VertexOut } vs_out; void main() { - vs_out.texcoord = position.xy*0.5+0.5; + vs_out.texcoord = position.xy*scale*0.5+0.5; vs_out.color = color; gl_Position = position; } */ /* Expected output: fragment +layout(binding=72) uniform GlobalValues +{ + vec4 tint; + vec2 scale; +}; layout(location=0) out vec4 frag_color; in VertexOut { @@ -45,6 +62,6 @@ in VertexOut } vs_out; void main() { - frag_color = vs_out.color; + frag_color = vs_out.color*tint; } */