Add tests for previous fix

This commit is contained in:
crosire 2018-09-11 20:57:56 +02:00
parent 0cdfbe490b
commit 3d39652853
5 changed files with 76 additions and 2 deletions

View File

@ -0,0 +1,26 @@
static float3 FragColor;
static float4 vColor;
struct SPIRV_Cross_Input
{
float4 vColor : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 FragColor : COLOR0;
};
void frag_main()
{
FragColor = vColor.xyz;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
vColor = stage_input.vColor;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = float4(FragColor, 0.0);
return stage_output;
}

View File

@ -0,0 +1,26 @@
static float3 FragColor;
static float4 vColor;
struct SPIRV_Cross_Input
{
float4 vColor : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float3 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = vColor.xyz;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
vColor = stage_input.vColor;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -0,0 +1,11 @@
#version 310 es
precision mediump float;
layout(location = 0) in vec4 vColor;
layout(location = 0) out vec3 FragColor;
void main()
{
FragColor = vColor.xyz;
}

View File

@ -0,0 +1,11 @@
#version 310 es
precision mediump float;
layout(location = 0) in vec4 vColor;
layout(location = 0) out vec3 FragColor;
void main()
{
FragColor = vColor.xyz;
}

View File

@ -192,8 +192,8 @@ def shader_to_sm(shader):
return '60'
elif '.sm51.' in shader:
return '51'
elif '.sm20.' in shader:
return '20'
elif '.sm30.' in shader:
return '30'
else:
return '50'