diff --git a/reference/shaders-hlsl/frag/no-return.frag b/reference/shaders-hlsl/frag/no-return.frag new file mode 100644 index 00000000..3b50282f --- /dev/null +++ b/reference/shaders-hlsl/frag/no-return.frag @@ -0,0 +1,8 @@ +void frag_main() +{ +} + +void main() +{ + frag_main(); +} diff --git a/reference/shaders-hlsl/frag/no-return2.frag b/reference/shaders-hlsl/frag/no-return2.frag new file mode 100644 index 00000000..a22ffa77 --- /dev/null +++ b/reference/shaders-hlsl/frag/no-return2.frag @@ -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(); +} diff --git a/reference/shaders-hlsl/vert/no-input.vert b/reference/shaders-hlsl/vert/no-input.vert new file mode 100644 index 00000000..1994f8ca --- /dev/null +++ b/reference/shaders-hlsl/vert/no-input.vert @@ -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; +} diff --git a/shaders-hlsl/frag/no-return.frag b/shaders-hlsl/frag/no-return.frag new file mode 100644 index 00000000..f0ef8702 --- /dev/null +++ b/shaders-hlsl/frag/no-return.frag @@ -0,0 +1,5 @@ +#version 310 es + +void main() +{ +} diff --git a/shaders-hlsl/frag/no-return2.frag b/shaders-hlsl/frag/no-return2.frag new file mode 100644 index 00000000..46bf9fbf --- /dev/null +++ b/shaders-hlsl/frag/no-return2.frag @@ -0,0 +1,9 @@ +#version 310 es +precision mediump float; + +layout(location = 0) in vec4 vColor; + +void main() +{ + vec4 v = vColor; +} diff --git a/shaders-hlsl/vert/no-input.vert b/shaders-hlsl/vert/no-input.vert new file mode 100644 index 00000000..8de8e816 --- /dev/null +++ b/shaders-hlsl/vert/no-input.vert @@ -0,0 +1,6 @@ +#version 310 es + +void main() +{ + gl_Position = vec4(1.0); +}