Add tests for legacy I/O flattening.

This commit is contained in:
Hans-Kristian Arntzen 2017-03-06 14:04:01 +01:00
parent c5de1cfa90
commit fd12124bf7
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#version 100
precision mediump float;
precision highp int;
varying vec4 VertexOut_color;
varying highp vec3 VertexOut_normal;
void main()
{
gl_FragData[0] = VertexOut_color + VertexOut_normal.xyzz;
}

View File

@ -0,0 +1,13 @@
#version 100
attribute vec4 Position;
varying vec4 VertexOut_color;
varying vec3 VertexOut_normal;
void main()
{
gl_Position = Position;
VertexOut_color = vec4(1.0);
VertexOut_normal = vec3(0.5);
}

View File

@ -0,0 +1,16 @@
#version 310 es
#extension GL_EXT_shader_io_blocks : require
precision mediump float;
layout(location = 1) in VertexOut
{
vec4 color;
highp vec3 normal;
} vin;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = vin.color + vin.normal.xyzz;
}

View File

@ -0,0 +1,17 @@
#version 310 es
#extension GL_EXT_shader_io_blocks : require
layout(location = 0) out VertexOut
{
vec4 color;
vec3 normal;
} vout;
layout(location = 0) in vec4 Position;
void main()
{
gl_Position = Position;
vout.color = vec4(1.0);
vout.normal = vec3(0.5);
}