mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-01 07:01:12 +00:00
132d331870
This commit adds support for copying nested hierarchical types of split types. E.g, a struct of a struct containing both user and builtin interstage IO variables. When copying split types, if any subtree does NOT contain builtin interstage IO, we can copy the whole subtree with one assignment, which saves a bunch of AST verbosity for memberwise copies of that subtree.
32 lines
510 B
GLSL
32 lines
510 B
GLSL
|
|
struct STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO
|
|
{
|
|
float m0_array[2];
|
|
int m1;
|
|
};
|
|
|
|
struct PS_IN
|
|
{
|
|
float4 pos : SV_Position;
|
|
float2 tc : TEXCOORD0;
|
|
// float c : SV_ClipDistance0;
|
|
};
|
|
|
|
struct GS_OUT
|
|
{
|
|
PS_IN psIn;
|
|
STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO contains_no_builtin_io;
|
|
};
|
|
|
|
|
|
[maxvertexcount(3)]
|
|
void main(triangle PS_IN tin[3], inout TriangleStream <GS_OUT> ts )
|
|
{
|
|
GS_OUT o;
|
|
|
|
o.psIn.pos = float4(1,2,3,4);
|
|
o.psIn.tc = float2(5,6);
|
|
|
|
ts.Append(o);
|
|
}
|