mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
Add test for input I/O blocks in fragment.
This commit is contained in:
parent
e89b789af3
commit
447545311b
28
reference/shaders-hlsl/frag/io-block.frag
Normal file
28
reference/shaders-hlsl/frag/io-block.frag
Normal 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;
|
||||
}
|
16
shaders-hlsl/frag/io-block.frag
Normal file
16
shaders-hlsl/frag/io-block.frag
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user