Add tests for previous fix
This commit is contained in:
parent
0cdfbe490b
commit
3d39652853
26
reference/shaders-hlsl/frag/basic-color-3comp.sm30.frag
Normal file
26
reference/shaders-hlsl/frag/basic-color-3comp.sm30.frag
Normal 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;
|
||||
}
|
26
reference/shaders-hlsl/frag/basic-color-3comp.sm50.frag
Normal file
26
reference/shaders-hlsl/frag/basic-color-3comp.sm50.frag
Normal 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;
|
||||
}
|
11
shaders-hlsl/frag/basic-color-3comp.sm30.frag
Normal file
11
shaders-hlsl/frag/basic-color-3comp.sm30.frag
Normal 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;
|
||||
}
|
||||
|
11
shaders-hlsl/frag/basic-color-3comp.sm50.frag
Normal file
11
shaders-hlsl/frag/basic-color-3comp.sm50.frag
Normal 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;
|
||||
}
|
||||
|
@ -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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user