Add test for input I/O blocks in fragment.

This commit is contained in:
Hans-Kristian Arntzen 2017-03-07 16:29:35 +01:00
parent e89b789af3
commit 447545311b
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,28 @@
static float4 FragColor;
struct VertexOut
{
float4 a : TEXCOORD1;
float4 b : TEXCOORD2;
};
static VertexOut _12;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = _12.a + _12.b;
}
SPIRV_Cross_Output main(in VertexOut stage_input_12)
{
_12 = stage_input_12;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

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 a;
vec4 b;
};
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = a + b;
}