X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fglsl%2Fpassthrough_declaration_order.glsl;fp=tests%2Fglsl%2Fpassthrough_declaration_order.glsl;h=52712d85056565e2fafdf2cf3fcc169e8d82bbf7;hb=9229a3e70dace406d897148857ed6567986c3bcd;hp=0000000000000000000000000000000000000000;hpb=d1feb41b3ff4dd462f50891e8901bad39466b75c;p=libs%2Fgl.git diff --git a/tests/glsl/passthrough_declaration_order.glsl b/tests/glsl/passthrough_declaration_order.glsl new file mode 100644 index 00000000..52712d85 --- /dev/null +++ b/tests/glsl/passthrough_declaration_order.glsl @@ -0,0 +1,41 @@ +#pragma MSP stage(vertex) +layout(location=0) in vec4 position; +void process(); +void main() +{ + gl_Position = position; + passthrough; + process(); +} +layout(location=1) in vec4 color; +void process() +{ + passthrough; +} + +#pragma MSP stage(fragment) +layout(location=0) out vec4 frag_color; +void main() +{ + frag_color = color; +} + +/* Expected output: vertex +layout(location=0) in vec4 position; +layout(location=1) in vec4 color; +out vec4 _vs_out_color; +void main() +{ + gl_Position = position; + _vs_out_color = color; +} +*/ + +/* Expected output: fragment +layout(location=0) out vec4 frag_color; +in vec4 _vs_out_color; +void main() +{ + frag_color = _vs_out_color; +} +*/