File: hlsl.struct.split.nested.geom

package info (click to toggle)
glslang 16.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,084 kB
  • sloc: cpp: 90,714; yacc: 4,243; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (34 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

struct STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO
{
    float m0_array[2] : mysemA;
    int   m1 : mysemB;
};

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);
    o.contains_no_builtin_io.m0_array[0] = 2.3;
    o.contains_no_builtin_io.m0_array[1] = 2.3;
    o.contains_no_builtin_io.m1 = 2;

    ts.Append(o);
}