SPIRV-Cross/reference/shaders-hlsl-no-opt/asm/vert/block-struct-initializer.asm.vert
Hans-Kristian Arntzen d6b29ab017 HLSL: Rewrite how block IO is emitted.
Emit block members directly in the IO structs and sort them.
Ensures we can get some kind of stable order between stages.

To complete the story, we'll need to be able to inject unused inputs /
builtins, or eliminate unused outputs (probably easiest solution).
2021-06-28 15:04:49 +02:00

39 lines
563 B
GLSL

struct Vert
{
float a;
float b;
};
struct Foo
{
float c;
float d;
};
static const Vert _11 = { 0.0f, 0.0f };
static const Foo _13 = { 0.0f, 0.0f };
static Vert _3 = { 0.0f, 0.0f };
static Foo foo = _13;
struct SPIRV_Cross_Output
{
float Vert_a : TEXCOORD0;
float Vert_b : TEXCOORD1;
Foo foo : TEXCOORD2;
};
void vert_main()
{
}
SPIRV_Cross_Output main()
{
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.Vert_a = _3.a;
stage_output.Vert_b = _3.b;
stage_output.foo = foo;
return stage_output;
}