Add some tests for no stage inputs or outputs in HLSL.

This commit is contained in:
Hans-Kristian Arntzen 2017-03-07 16:27:20 +01:00
parent 62df60ea3d
commit e89b789af3
6 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,8 @@
void frag_main()
{
}
void main()
{
frag_main();
}

View File

@ -0,0 +1,17 @@
static float4 vColor;
struct SPIRV_Cross_Input
{
float4 vColor : TEXCOORD0;
};
void frag_main()
{
float4 v = vColor;
}
void main(SPIRV_Cross_Input stage_input)
{
vColor = stage_input.vColor;
frag_main();
}

View File

@ -0,0 +1,18 @@
static float4 gl_Position;
struct SPIRV_Cross_Output
{
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = float4(1.0f, 1.0f, 1.0f, 1.0f);
}
SPIRV_Cross_Output main()
{
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
return stage_output;
}

View File

@ -0,0 +1,5 @@
#version 310 es
void main()
{
}

View File

@ -0,0 +1,9 @@
#version 310 es
precision mediump float;
layout(location = 0) in vec4 vColor;
void main()
{
vec4 v = vColor;
}

View File

@ -0,0 +1,6 @@
#version 310 es
void main()
{
gl_Position = vec4(1.0);
}