Merge pull request #808 from steve-lunarg/gs-ep-wrap-fix

HLSL: fix GS to work with EP wrapping
This commit is contained in:
John Kessenich 2017-04-03 16:58:14 -06:00 committed by GitHub
commit b68b9a8b23
10 changed files with 494 additions and 237 deletions

View File

@ -43,12 +43,12 @@ output primitive = line_strip
0:20 0 (const int) 0:20 0 (const int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something}) 0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something})
0:22 'OutputStream' ( out structure{ temp float myfloat, temp int something}) 0:22 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) 0:22 'Vert' ( temp structure{ temp float myfloat, temp int something})
0:22 EmitVertex ( temp void) 0:22 EmitVertex ( temp void)
0:23 Sequence 0:23 Sequence
0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something}) 0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something})
0:23 'OutputStream' ( out structure{ temp float myfloat, temp int something}) 0:23 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) 0:23 'Vert' ( temp structure{ temp float myfloat, temp int something})
0:23 EmitVertex ( temp void) 0:23 EmitVertex ( temp void)
0:24 EndPrimitive ( temp void) 0:24 EndPrimitive ( temp void)
@ -68,6 +68,7 @@ output primitive = line_strip
0:? Linker Objects 0:? Linker Objects
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? 'test' (layout( location=1) in 3-element array of uint) 0:? 'test' (layout( location=1) in 3-element array of uint)
0:? 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
Linked geometry stage: Linked geometry stage:
@ -117,12 +118,12 @@ output primitive = line_strip
0:20 0 (const int) 0:20 0 (const int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something}) 0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something})
0:22 'OutputStream' ( out structure{ temp float myfloat, temp int something}) 0:22 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) 0:22 'Vert' ( temp structure{ temp float myfloat, temp int something})
0:22 EmitVertex ( temp void) 0:22 EmitVertex ( temp void)
0:23 Sequence 0:23 Sequence
0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something}) 0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something})
0:23 'OutputStream' ( out structure{ temp float myfloat, temp int something}) 0:23 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) 0:23 'Vert' ( temp structure{ temp float myfloat, temp int something})
0:23 EmitVertex ( temp void) 0:23 EmitVertex ( temp void)
0:24 EndPrimitive ( temp void) 0:24 EndPrimitive ( temp void)
@ -142,15 +143,16 @@ output primitive = line_strip
0:? Linker Objects 0:? Linker Objects
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? 'test' (layout( location=1) in 3-element array of uint) 0:? 'test' (layout( location=1) in 3-element array of uint)
0:? 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 57 // Id's are bound by 60
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 45 48 EntryPoint Geometry 4 "main" 42 47 50
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip ExecutionMode 4 OutputLineStrip
@ -164,16 +166,18 @@ output primitive = line_strip
Name 16 "test" Name 16 "test"
Name 17 "OutputStream" Name 17 "OutputStream"
Name 20 "Vert" Name 20 "Vert"
Name 43 "VertexID" Name 42 "OutputStream"
Name 45 "VertexID" Name 45 "VertexID"
Name 47 "test" Name 47 "VertexID"
Name 48 "test" Name 49 "test"
Name 50 "OutputStream" Name 50 "test"
Name 51 "param" Name 52 "OutputStream"
Name 53 "param" Name 53 "param"
Name 55 "param" Name 55 "param"
Decorate 45(VertexID) Location 0 Name 57 "param"
Decorate 48(test) Location 1 Decorate 42(OutputStream) Location 0
Decorate 47(VertexID) Location 0
Decorate 50(test) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -191,26 +195,30 @@ output primitive = line_strip
29: 11(int) Constant 2 29: 11(int) Constant 2
34: TypePointer Function 10(float) 34: TypePointer Function 10(float)
39: TypePointer Function 11(int) 39: TypePointer Function 11(int)
44: TypePointer Input 8 41: TypePointer Output 12(PSInput)
45(VertexID): 44(ptr) Variable Input 42(OutputStream): 41(ptr) Variable Output
48(test): 44(ptr) Variable Input 46: TypePointer Input 8
47(VertexID): 46(ptr) Variable Input
50(test): 46(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
43(VertexID): 9(ptr) Variable Function 45(VertexID): 9(ptr) Variable Function
47(test): 9(ptr) Variable Function 49(test): 9(ptr) Variable Function
50(OutputStream): 13(ptr) Variable Function 52(OutputStream): 13(ptr) Variable Function
51(param): 9(ptr) Variable Function
53(param): 9(ptr) Variable Function 53(param): 9(ptr) Variable Function
55(param): 13(ptr) Variable Function 55(param): 9(ptr) Variable Function
46: 8 Load 45(VertexID) 57(param): 13(ptr) Variable Function
Store 43(VertexID) 46 48: 8 Load 47(VertexID)
49: 8 Load 48(test) Store 45(VertexID) 48
Store 47(test) 49 51: 8 Load 50(test)
52: 8 Load 43(VertexID) Store 49(test) 51
Store 51(param) 52 54: 8 Load 45(VertexID)
54: 8 Load 47(test)
Store 53(param) 54 Store 53(param) 54
56: 2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 51(param) 53(param) 55(param) 56: 8 Load 49(test)
Store 55(param) 56
58: 2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 53(param) 55(param) 57(param)
59: 12(PSInput) Load 57(param)
Store 52(OutputStream) 59
Return Return
FunctionEnd FunctionEnd
18(@main(u1[3];u1[3];struct-PSInput-f1-i11;): 2 Function None 14 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;): 2 Function None 14
@ -235,11 +243,11 @@ output primitive = line_strip
38: 11(int) Bitcast 37 38: 11(int) Bitcast 37
40: 39(ptr) AccessChain 20(Vert) 25 40: 39(ptr) AccessChain 20(Vert) 25
Store 40 38 Store 40 38
41: 12(PSInput) Load 20(Vert) 43: 12(PSInput) Load 20(Vert)
Store 17(OutputStream) 41 Store 42(OutputStream) 43
EmitVertex EmitVertex
42: 12(PSInput) Load 20(Vert) 44: 12(PSInput) Load 20(Vert)
Store 17(OutputStream) 42 Store 42(OutputStream) 44
EmitVertex EmitVertex
EndPrimitive EndPrimitive
Return Return

View File

@ -25,25 +25,25 @@ output primitive = line_strip
0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint)
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 move second child to first child ( temp float) 0:12 move second child to first child ( temp float)
0:? '@entryPointOutput_clip0' ( out float ClipDistance) 0:? 'OutputStream_clip0' ( out float ClipDistance)
0:12 clip0: direct index for structure ( temp float) 0:12 clip0: direct index for structure ( temp float)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 0 (const int) 0:12 0 (const int)
0:12 move second child to first child ( temp float) 0:12 move second child to first child ( temp float)
0:? '@entryPointOutput_cull0' ( out float CullDistance) 0:? 'OutputStream_cull0' ( out float CullDistance)
0:12 cull0: direct index for structure ( temp float) 0:12 cull0: direct index for structure ( temp float)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 1 (const int) 0:12 1 (const int)
0:12 move second child to first child ( temp uint) 0:12 move second child to first child ( temp uint)
0:? '@entryPointOutput_vpai' ( out uint ViewportIndex) 0:? 'OutputStream_vpai' ( out uint ViewportIndex)
0:12 vpai: direct index for structure ( temp uint) 0:12 vpai: direct index for structure ( temp uint)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 2 (const int) 0:12 2 (const int)
0:12 move second child to first child ( temp uint) 0:12 move second child to first child ( temp uint)
0:? '@entryPointOutput_rtai' ( out uint Layer) 0:? 'OutputStream_rtai' ( out uint Layer)
0:12 rtai: direct index for structure ( temp uint) 0:12 rtai: direct index for structure ( temp uint)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
@ -60,7 +60,8 @@ output primitive = line_strip
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) 0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? '@entryPointOutput_vpai' ( out uint ViewportIndex) 0:? 'OutputStream' (layout( location=1) out structure{ temp int ii})
0:? 'OutputStream_vpai' ( out uint ViewportIndex)
Linked geometry stage: Linked geometry stage:
@ -92,25 +93,25 @@ output primitive = line_strip
0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint)
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 move second child to first child ( temp float) 0:12 move second child to first child ( temp float)
0:? '@entryPointOutput_clip0' ( out float ClipDistance) 0:? 'OutputStream_clip0' ( out float ClipDistance)
0:12 clip0: direct index for structure ( temp float) 0:12 clip0: direct index for structure ( temp float)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 0 (const int) 0:12 0 (const int)
0:12 move second child to first child ( temp float) 0:12 move second child to first child ( temp float)
0:? '@entryPointOutput_cull0' ( out float CullDistance) 0:? 'OutputStream_cull0' ( out float CullDistance)
0:12 cull0: direct index for structure ( temp float) 0:12 cull0: direct index for structure ( temp float)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 1 (const int) 0:12 1 (const int)
0:12 move second child to first child ( temp uint) 0:12 move second child to first child ( temp uint)
0:? '@entryPointOutput_vpai' ( out uint ViewportIndex) 0:? 'OutputStream_vpai' ( out uint ViewportIndex)
0:12 vpai: direct index for structure ( temp uint) 0:12 vpai: direct index for structure ( temp uint)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
0:12 2 (const int) 0:12 2 (const int)
0:12 move second child to first child ( temp uint) 0:12 move second child to first child ( temp uint)
0:? '@entryPointOutput_rtai' ( out uint Layer) 0:? 'OutputStream_rtai' ( out uint Layer)
0:12 rtai: direct index for structure ( temp uint) 0:12 rtai: direct index for structure ( temp uint)
0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant: 0:12 Constant:
@ -127,11 +128,12 @@ output primitive = line_strip
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) 0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint)
0:? '@entryPointOutput_vpai' ( out uint ViewportIndex) 0:? 'OutputStream' (layout( location=1) out structure{ temp int ii})
0:? 'OutputStream_vpai' ( out uint ViewportIndex)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 62 // Id's are bound by 66
Capability Geometry Capability Geometry
Capability ClipDistance Capability ClipDistance
@ -139,7 +141,7 @@ output primitive = line_strip
Capability MultiViewport Capability MultiViewport
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 25 34 39 44 49 55 EntryPoint Geometry 4 "main" 25 35 40 45 50 56 65
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip ExecutionMode 4 OutputLineStrip
@ -161,19 +163,23 @@ output primitive = line_strip
Name 28 "OutputStream" Name 28 "OutputStream"
Name 29 "param" Name 29 "param"
Name 31 "param" Name 31 "param"
Name 34 "@entryPointOutput_clip0" Name 35 "OutputStream_clip0"
Name 39 "@entryPointOutput_cull0" Name 40 "OutputStream_cull0"
Name 44 "@entryPointOutput_vpai" Name 45 "OutputStream_vpai"
Name 49 "@entryPointOutput_rtai" Name 50 "OutputStream_rtai"
Name 53 "S" Name 54 "S"
MemberName 53(S) 0 "ii" MemberName 54(S) 0 "ii"
Name 55 "@entryPointOutput" Name 56 "@entryPointOutput"
Name 63 "S"
MemberName 63(S) 0 "ii"
Name 65 "OutputStream"
Decorate 25(VertexID) Location 0 Decorate 25(VertexID) Location 0
Decorate 34(@entryPointOutput_clip0) BuiltIn ClipDistance Decorate 35(OutputStream_clip0) BuiltIn ClipDistance
Decorate 39(@entryPointOutput_cull0) BuiltIn CullDistance Decorate 40(OutputStream_cull0) BuiltIn CullDistance
Decorate 44(@entryPointOutput_vpai) BuiltIn ViewportIndex Decorate 45(OutputStream_vpai) BuiltIn ViewportIndex
Decorate 49(@entryPointOutput_rtai) BuiltIn Layer Decorate 50(OutputStream_rtai) BuiltIn Layer
Decorate 55(@entryPointOutput) Location 0 Decorate 56(@entryPointOutput) Location 0
Decorate 65(OutputStream) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -187,24 +193,27 @@ output primitive = line_strip
14: TypeFunction 12(S) 9(ptr) 13(ptr) 14: TypeFunction 12(S) 9(ptr) 13(ptr)
24: TypePointer Input 8 24: TypePointer Input 8
25(VertexID): 24(ptr) Variable Input 25(VertexID): 24(ptr) Variable Input
33: TypePointer Output 10(float) 34: TypePointer Output 10(float)
34(@entryPointOutput_clip0): 33(ptr) Variable Output 35(OutputStream_clip0): 34(ptr) Variable Output
35: 11(int) Constant 0 36: 11(int) Constant 0
36: TypePointer Function 10(float) 37: TypePointer Function 10(float)
39(@entryPointOutput_cull0): 33(ptr) Variable Output 40(OutputStream_cull0): 34(ptr) Variable Output
40: 11(int) Constant 1 41: 11(int) Constant 1
43: TypePointer Output 6(int) 44: TypePointer Output 6(int)
44(@entryPointOutput_vpai): 43(ptr) Variable Output 45(OutputStream_vpai): 44(ptr) Variable Output
45: 11(int) Constant 2 46: 11(int) Constant 2
46: TypePointer Function 6(int) 47: TypePointer Function 6(int)
49(@entryPointOutput_rtai): 43(ptr) Variable Output 50(OutputStream_rtai): 44(ptr) Variable Output
50: 11(int) Constant 3 51: 11(int) Constant 3
53(S): TypeStruct 11(int) 54(S): TypeStruct 11(int)
54: TypePointer Output 53(S) 55: TypePointer Output 54(S)
55(@entryPointOutput): 54(ptr) Variable Output 56(@entryPointOutput): 55(ptr) Variable Output
56: 11(int) Constant 4 57: 11(int) Constant 4
57: TypePointer Function 11(int) 58: TypePointer Function 11(int)
60: TypePointer Output 11(int) 61: TypePointer Output 11(int)
63(S): TypeStruct 11(int)
64: TypePointer Output 63(S)
65(OutputStream): 64(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
23(VertexID): 9(ptr) Variable Function 23(VertexID): 9(ptr) Variable Function
@ -217,23 +226,25 @@ output primitive = line_strip
30: 8 Load 23(VertexID) 30: 8 Load 23(VertexID)
Store 29(param) 30 Store 29(param) 30
32: 12(S) FunctionCall 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;) 29(param) 31(param) 32: 12(S) FunctionCall 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;) 29(param) 31(param)
33: 12(S) Load 31(param)
Store 28(OutputStream) 33
Store 27(flattenTemp) 32 Store 27(flattenTemp) 32
37: 36(ptr) AccessChain 27(flattenTemp) 35 38: 37(ptr) AccessChain 27(flattenTemp) 36
38: 10(float) Load 37 39: 10(float) Load 38
Store 34(@entryPointOutput_clip0) 38 Store 35(OutputStream_clip0) 39
41: 36(ptr) AccessChain 27(flattenTemp) 40 42: 37(ptr) AccessChain 27(flattenTemp) 41
42: 10(float) Load 41 43: 10(float) Load 42
Store 39(@entryPointOutput_cull0) 42 Store 40(OutputStream_cull0) 43
47: 46(ptr) AccessChain 27(flattenTemp) 45 48: 47(ptr) AccessChain 27(flattenTemp) 46
48: 6(int) Load 47 49: 6(int) Load 48
Store 44(@entryPointOutput_vpai) 48 Store 45(OutputStream_vpai) 49
51: 46(ptr) AccessChain 27(flattenTemp) 50 52: 47(ptr) AccessChain 27(flattenTemp) 51
52: 6(int) Load 51 53: 6(int) Load 52
Store 49(@entryPointOutput_rtai) 52 Store 50(OutputStream_rtai) 53
58: 57(ptr) AccessChain 27(flattenTemp) 56 59: 58(ptr) AccessChain 27(flattenTemp) 57
59: 11(int) Load 58 60: 11(int) Load 59
61: 60(ptr) AccessChain 55(@entryPointOutput) 35 62: 61(ptr) AccessChain 56(@entryPointOutput) 36
Store 61 59 Store 62 60
Return Return
FunctionEnd FunctionEnd
17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;): 12(S) Function None 14 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;): 12(S) Function None 14

View File

@ -72,6 +72,7 @@ output primitive = triangle_strip
0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) 0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? Linker Objects 0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint) 0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
Linked geometry stage: Linked geometry stage:
@ -150,15 +151,16 @@ output primitive = triangle_strip
0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) 0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? Linker Objects 0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint) 0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 73 // Id's are bound by 77
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 66 EntryPoint Geometry 4 "main" 66 76
ExecutionMode 4 InputPoints ExecutionMode 4 InputPoints
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
@ -181,7 +183,13 @@ output primitive = triangle_strip
Name 68 "OutputStream" Name 68 "OutputStream"
Name 69 "param" Name 69 "param"
Name 71 "param" Name 71 "param"
Name 74 "PSInput"
MemberName 74(PSInput) 0 "TexCoord"
MemberName 74(PSInput) 1 "TerrainPos"
MemberName 74(PSInput) 2 "VertexID"
Name 76 "OutputStream"
Decorate 66(v) Location 0 Decorate 66(v) Location 0
Decorate 76(OutputStream) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -214,6 +222,9 @@ output primitive = triangle_strip
60: 28(int) Constant 1 60: 28(int) Constant 1
65: TypePointer Input 8 65: TypePointer Input 8
66(v): 65(ptr) Variable Input 66(v): 65(ptr) Variable Input
74(PSInput): TypeStruct 12(fvec2) 13(fvec3) 6(int)
75: TypePointer Output 74(PSInput)
76(OutputStream): 75(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
64(v): 9(ptr) Variable Function 64(v): 9(ptr) Variable Function
@ -225,6 +236,8 @@ output primitive = triangle_strip
70: 8 Load 64(v) 70: 8 Load 64(v)
Store 69(param) 70 Store 69(param) 70
72: 2 FunctionCall 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;) 69(param) 71(param) 72: 2 FunctionCall 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;) 69(param) 71(param)
73: 14(PSInput) Load 71(param)
Store 68(OutputStream) 73
Return Return
FunctionEnd FunctionEnd
19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;): 2 Function None 16 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;): 2 Function None 16

View File

@ -35,9 +35,40 @@ output primitive = triangle_strip
0:? 5.000000 0:? 5.000000
0:? 6.000000 0:? 6.000000
0:30 Sequence 0:30 Sequence
0:30 move second child to first child ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 Sequence
0:30 'ts' ( out structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:30 pos: direct index for structure ( temp 4-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child ( temp 2-component vector of float)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex ( temp void) 0:30 EmitVertex ( temp void)
0:24 Function Definition: main( ( temp void) 0:24 Function Definition: main( ( temp void)
0:24 Function Parameters: 0:24 Function Parameters:
@ -129,6 +160,7 @@ output primitive = triangle_strip
0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? Linker Objects 0:? Linker Objects
0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) 0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
0:? 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
Linked geometry stage: Linked geometry stage:
@ -170,9 +202,40 @@ output primitive = triangle_strip
0:? 5.000000 0:? 5.000000
0:? 6.000000 0:? 6.000000
0:30 Sequence 0:30 Sequence
0:30 move second child to first child ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 Sequence
0:30 'ts' ( out structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:30 pos: direct index for structure ( temp 4-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child ( temp 2-component vector of float)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex ( temp void) 0:30 EmitVertex ( temp void)
0:24 Function Definition: main( ( temp void) 0:24 Function Definition: main( ( temp void)
0:24 Function Parameters: 0:24 Function Parameters:
@ -264,15 +327,16 @@ output primitive = triangle_strip
0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? Linker Objects 0:? Linker Objects
0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) 0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
0:? 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 75 // Id's are bound by 99
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 44 52 EntryPoint Geometry 4 "main" 41 48 67 75
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
@ -291,16 +355,28 @@ output primitive = triangle_strip
Name 21 "tin" Name 21 "tin"
Name 22 "ts" Name 22 "ts"
Name 25 "o" Name 25 "o"
Name 41 "tin" Name 41 "ts_psIn_pos"
Name 44 "tin_pos" Name 44 "PS_IN"
Name 49 "PS_IN" MemberName 44(PS_IN) 0 "tc"
MemberName 49(PS_IN) 0 "tc" Name 45 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
Name 52 "tin" MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
Name 70 "ts" MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
Name 71 "param" Name 46 "GS_OUT"
Name 73 "param" MemberName 46(GS_OUT) 0 "psIn"
Decorate 44(tin_pos) BuiltIn Position MemberName 46(GS_OUT) 1 "contains_no_builtin_io"
Decorate 52(tin) Location 0 Name 48 "ts"
Name 64 "tin"
Name 67 "tin_pos"
Name 72 "PS_IN"
MemberName 72(PS_IN) 0 "tc"
Name 75 "tin"
Name 93 "ts"
Name 94 "param"
Name 96 "param"
Decorate 41(ts_psIn_pos) BuiltIn Position
Decorate 48(ts) Location 0
Decorate 67(tin_pos) BuiltIn Position
Decorate 75(tin) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -330,49 +406,63 @@ output primitive = triangle_strip
36: 6(float) Constant 1086324736 36: 6(float) Constant 1086324736
37: 8(fvec2) ConstantComposite 35 36 37: 8(fvec2) ConstantComposite 35 36
38: TypePointer Function 8(fvec2) 38: TypePointer Function 8(fvec2)
42: TypeArray 7(fvec4) 11 40: TypePointer Output 7(fvec4)
43: TypePointer Input 42 41(ts_psIn_pos): 40(ptr) Variable Output
44(tin_pos): 43(ptr) Variable Input 44(PS_IN): TypeStruct 8(fvec2)
45: TypePointer Input 7(fvec4) 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 15 16(int)
49(PS_IN): TypeStruct 8(fvec2) 46(GS_OUT): TypeStruct 44(PS_IN) 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
50: TypeArray 49(PS_IN) 11 47: TypePointer Output 46(GS_OUT)
51: TypePointer Input 50 48(ts): 47(ptr) Variable Output
52(tin): 51(ptr) Variable Input 51: TypePointer Output 8(fvec2)
53: TypePointer Input 8(fvec2) 53: TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
63: 16(int) Constant 2 56: TypePointer Output 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
59: TypePointer Output 15
62: TypePointer Output 16(int)
65: TypeArray 7(fvec4) 11
66: TypePointer Input 65
67(tin_pos): 66(ptr) Variable Input
68: TypePointer Input 7(fvec4)
72(PS_IN): TypeStruct 8(fvec2)
73: TypeArray 72(PS_IN) 11
74: TypePointer Input 73
75(tin): 74(ptr) Variable Input
76: TypePointer Input 8(fvec2)
86: 16(int) Constant 2
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
41(tin): 13(ptr) Variable Function 64(tin): 13(ptr) Variable Function
70(ts): 19(ptr) Variable Function 93(ts): 19(ptr) Variable Function
71(param): 13(ptr) Variable Function 94(param): 13(ptr) Variable Function
73(param): 19(ptr) Variable Function 96(param): 19(ptr) Variable Function
46: 45(ptr) AccessChain 44(tin_pos) 26 69: 68(ptr) AccessChain 67(tin_pos) 26
47: 7(fvec4) Load 46 70: 7(fvec4) Load 69
48: 32(ptr) AccessChain 41(tin) 26 26 71: 32(ptr) AccessChain 64(tin) 26 26
Store 48 47 Store 71 70
54: 53(ptr) AccessChain 52(tin) 26 26 77: 76(ptr) AccessChain 75(tin) 26 26
55: 8(fvec2) Load 54 78: 8(fvec2) Load 77
56: 38(ptr) AccessChain 41(tin) 26 34 79: 38(ptr) AccessChain 64(tin) 26 34
Store 56 55 Store 79 78
57: 45(ptr) AccessChain 44(tin_pos) 34 80: 68(ptr) AccessChain 67(tin_pos) 34
58: 7(fvec4) Load 57 81: 7(fvec4) Load 80
59: 32(ptr) AccessChain 41(tin) 34 26 82: 32(ptr) AccessChain 64(tin) 34 26
Store 59 58 Store 82 81
60: 53(ptr) AccessChain 52(tin) 34 26 83: 76(ptr) AccessChain 75(tin) 34 26
61: 8(fvec2) Load 60 84: 8(fvec2) Load 83
62: 38(ptr) AccessChain 41(tin) 34 34 85: 38(ptr) AccessChain 64(tin) 34 34
Store 62 61 Store 85 84
64: 45(ptr) AccessChain 44(tin_pos) 63 87: 68(ptr) AccessChain 67(tin_pos) 86
65: 7(fvec4) Load 64 88: 7(fvec4) Load 87
66: 32(ptr) AccessChain 41(tin) 63 26 89: 32(ptr) AccessChain 64(tin) 86 26
Store 66 65 Store 89 88
67: 53(ptr) AccessChain 52(tin) 63 26 90: 76(ptr) AccessChain 75(tin) 86 26
68: 8(fvec2) Load 67 91: 8(fvec2) Load 90
69: 38(ptr) AccessChain 41(tin) 63 34 92: 38(ptr) AccessChain 64(tin) 86 34
Store 69 68 Store 92 91
72: 12 Load 41(tin) 95: 12 Load 64(tin)
Store 71(param) 72 Store 94(param) 95
74: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 71(param) 73(param) 97: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 94(param) 96(param)
98: 18(GS_OUT) Load 96(param)
Store 93(ts) 98
Return Return
FunctionEnd FunctionEnd
23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20
@ -384,8 +474,22 @@ output primitive = triangle_strip
Store 33 31 Store 33 31
39: 38(ptr) AccessChain 25(o) 26 34 39: 38(ptr) AccessChain 25(o) 26 34
Store 39 37 Store 39 37
40: 18(GS_OUT) Load 25(o) 42: 32(ptr) AccessChain 25(o) 26 26
Store 22(ts) 40 43: 7(fvec4) Load 42
Store 41(ts_psIn_pos) 43
49: 38(ptr) AccessChain 25(o) 26 34
50: 8(fvec2) Load 49
52: 51(ptr) AccessChain 48(ts) 26 26
Store 52 50
54: 53(ptr) AccessChain 25(o) 34
55:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 54
57: 56(ptr) AccessChain 48(ts) 34
58: 15 CompositeExtract 55 0
60: 59(ptr) AccessChain 57 26
Store 60 58
61: 16(int) CompositeExtract 55 1
63: 62(ptr) AccessChain 57 34
Store 63 61
EmitVertex EmitVertex
Return Return
FunctionEnd FunctionEnd

View File

@ -35,9 +35,13 @@ output primitive = triangle_strip
0:18 Constant: 0:18 Constant:
0:18 0 (const int) 0:18 0 (const int)
0:19 Sequence 0:19 Sequence
0:19 move second child to first child ( temp structure{ temp 4-component vector of float pos}) 0:19 Sequence
0:19 'ts' ( out structure{ temp 4-component vector of float pos}) 0:19 move second child to first child ( temp 4-component vector of float)
0:? 'ts_pos' ( out 4-component vector of float Position)
0:19 pos: direct index for structure ( temp 4-component vector of float)
0:19 'o' ( temp structure{ temp 4-component vector of float pos}) 0:19 'o' ( temp structure{ temp 4-component vector of float pos})
0:19 Constant:
0:19 0 (const int)
0:19 EmitVertex ( temp void) 0:19 EmitVertex ( temp void)
0:17 Loop Terminal Expression 0:17 Loop Terminal Expression
0:17 Pre-Increment ( temp int) 0:17 Pre-Increment ( temp int)
@ -87,6 +91,7 @@ output primitive = triangle_strip
0:? 'ts' ( temp structure{ temp 4-component vector of float pos}) 0:? 'ts' ( temp structure{ temp 4-component vector of float pos})
0:? Linker Objects 0:? Linker Objects
0:? 'i' (layout( location=0) in 3-element array of structure{}) 0:? 'i' (layout( location=0) in 3-element array of structure{})
0:? 'ts' (layout( location=0) out structure{})
Linked geometry stage: Linked geometry stage:
@ -128,9 +133,13 @@ output primitive = triangle_strip
0:18 Constant: 0:18 Constant:
0:18 0 (const int) 0:18 0 (const int)
0:19 Sequence 0:19 Sequence
0:19 move second child to first child ( temp structure{ temp 4-component vector of float pos}) 0:19 Sequence
0:19 'ts' ( out structure{ temp 4-component vector of float pos}) 0:19 move second child to first child ( temp 4-component vector of float)
0:? 'ts_pos' ( out 4-component vector of float Position)
0:19 pos: direct index for structure ( temp 4-component vector of float)
0:19 'o' ( temp structure{ temp 4-component vector of float pos}) 0:19 'o' ( temp structure{ temp 4-component vector of float pos})
0:19 Constant:
0:19 0 (const int)
0:19 EmitVertex ( temp void) 0:19 EmitVertex ( temp void)
0:17 Loop Terminal Expression 0:17 Loop Terminal Expression
0:17 Pre-Increment ( temp int) 0:17 Pre-Increment ( temp int)
@ -180,15 +189,16 @@ output primitive = triangle_strip
0:? 'ts' ( temp structure{ temp 4-component vector of float pos}) 0:? 'ts' ( temp structure{ temp 4-component vector of float pos})
0:? Linker Objects 0:? Linker Objects
0:? 'i' (layout( location=0) in 3-element array of structure{}) 0:? 'i' (layout( location=0) in 3-element array of structure{})
0:? 'ts' (layout( location=0) out structure{})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 67 // Id's are bound by 74
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 46 66 EntryPoint Geometry 4 "main" 40 49 70 73
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
@ -203,15 +213,20 @@ output primitive = triangle_strip
Name 17 "ts" Name 17 "ts"
Name 22 "x" Name 22 "x"
Name 33 "o" Name 33 "o"
Name 43 "i" Name 40 "ts_pos"
Name 46 "i_pos" Name 46 "i"
Name 58 "ts" Name 49 "i_pos"
Name 59 "param" Name 61 "ts"
Name 61 "param" Name 62 "param"
Name 63 "PS_IN" Name 64 "param"
Name 66 "i" Name 67 "PS_IN"
Decorate 46(i_pos) BuiltIn Position Name 70 "i"
Decorate 66(i) Location 0 Name 71 "GS_OUT"
Name 73 "ts"
Decorate 40(ts_pos) BuiltIn Position
Decorate 49(i_pos) BuiltIn Position
Decorate 70(i) Location 0
Decorate 73(ts) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -230,37 +245,44 @@ output primitive = triangle_strip
30: 20(int) Constant 3 30: 20(int) Constant 3
31: TypeBool 31: TypeBool
35: TypePointer Function 7(fvec4) 35: TypePointer Function 7(fvec4)
41: 20(int) Constant 1 39: TypePointer Output 7(fvec4)
44: TypeArray 7(fvec4) 10 40(ts_pos): 39(ptr) Variable Output
45: TypePointer Input 44 44: 20(int) Constant 1
46(i_pos): 45(ptr) Variable Input 47: TypeArray 7(fvec4) 10
47: TypePointer Input 7(fvec4) 48: TypePointer Input 47
54: 20(int) Constant 2 49(i_pos): 48(ptr) Variable Input
63(PS_IN): TypeStruct 50: TypePointer Input 7(fvec4)
64: TypeArray 63(PS_IN) 10 57: 20(int) Constant 2
65: TypePointer Input 64 67(PS_IN): TypeStruct
66(i): 65(ptr) Variable Input 68: TypeArray 67(PS_IN) 10
69: TypePointer Input 68
70(i): 69(ptr) Variable Input
71(GS_OUT): TypeStruct
72: TypePointer Output 71(GS_OUT)
73(ts): 72(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
43(i): 12(ptr) Variable Function 46(i): 12(ptr) Variable Function
58(ts): 14(ptr) Variable Function 61(ts): 14(ptr) Variable Function
59(param): 12(ptr) Variable Function 62(param): 12(ptr) Variable Function
61(param): 14(ptr) Variable Function 64(param): 14(ptr) Variable Function
48: 47(ptr) AccessChain 46(i_pos) 23 51: 50(ptr) AccessChain 49(i_pos) 23
49: 7(fvec4) Load 48
50: 35(ptr) AccessChain 43(i) 23 23
Store 50 49
51: 47(ptr) AccessChain 46(i_pos) 41
52: 7(fvec4) Load 51 52: 7(fvec4) Load 51
53: 35(ptr) AccessChain 43(i) 41 23 53: 35(ptr) AccessChain 46(i) 23 23
Store 53 52 Store 53 52
55: 47(ptr) AccessChain 46(i_pos) 54 54: 50(ptr) AccessChain 49(i_pos) 44
56: 7(fvec4) Load 55 55: 7(fvec4) Load 54
57: 35(ptr) AccessChain 43(i) 54 23 56: 35(ptr) AccessChain 46(i) 44 23
Store 57 56 Store 56 55
60: 11 Load 43(i) 58: 50(ptr) AccessChain 49(i_pos) 57
Store 59(param) 60 59: 7(fvec4) Load 58
62: 2 FunctionCall 18(@main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41;) 59(param) 61(param) 60: 35(ptr) AccessChain 46(i) 57 23
Store 60 59
63: 11 Load 46(i)
Store 62(param) 63
65: 2 FunctionCall 18(@main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41;) 62(param) 64(param)
66: 13(GS_OUT) Load 64(param)
Store 61(ts) 66
Return Return
FunctionEnd FunctionEnd
18(@main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41;): 2 Function None 15 18(@main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41;): 2 Function None 15
@ -284,14 +306,15 @@ output primitive = triangle_strip
37: 7(fvec4) Load 36 37: 7(fvec4) Load 36
38: 35(ptr) AccessChain 33(o) 23 38: 35(ptr) AccessChain 33(o) 23
Store 38 37 Store 38 37
39: 13(GS_OUT) Load 33(o) 41: 35(ptr) AccessChain 33(o) 23
Store 17(ts) 39 42: 7(fvec4) Load 41
Store 40(ts_pos) 42
EmitVertex EmitVertex
Branch 27 Branch 27
27: Label 27: Label
40: 20(int) Load 22(x) 43: 20(int) Load 22(x)
42: 20(int) IAdd 40 41 45: 20(int) IAdd 43 44
Store 22(x) 42 Store 22(x) 45
Branch 24 Branch 24
26: Label 26: Label
Return Return

View File

@ -47,9 +47,31 @@ output primitive = triangle_strip
0:21 Constant: 0:21 Constant:
0:21 0 (const int) 0:21 0 (const int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Sequence
0:22 'outStream' ( out structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 move second child to first child ( temp 4-component vector of float)
0:? 'outStream_position' ( out 4-component vector of float Position)
0:22 position: direct index for structure ( temp 4-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child ( temp 4-component vector of float)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 move second child to first child ( temp 2-component vector of float)
0:22 uv: direct index for structure ( temp 2-component vector of float)
0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 uv: direct index for structure ( temp 2-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 2 (const int)
0:22 EmitVertex ( temp void) 0:22 EmitVertex ( temp void)
0:16 Function Definition: main( ( temp void) 0:16 Function Definition: main( ( temp void)
0:16 Function Parameters: 0:16 Function Parameters:
@ -62,6 +84,7 @@ output primitive = triangle_strip
0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Linker Objects 0:? Linker Objects
0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
Linked geometry stage: Linked geometry stage:
@ -115,9 +138,31 @@ output primitive = triangle_strip
0:21 Constant: 0:21 Constant:
0:21 0 (const int) 0:21 0 (const int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Sequence
0:22 'outStream' ( out structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 move second child to first child ( temp 4-component vector of float)
0:? 'outStream_position' ( out 4-component vector of float Position)
0:22 position: direct index for structure ( temp 4-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child ( temp 4-component vector of float)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 move second child to first child ( temp 2-component vector of float)
0:22 uv: direct index for structure ( temp 2-component vector of float)
0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 uv: direct index for structure ( temp 2-component vector of float)
0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 2 (const int)
0:22 EmitVertex ( temp void) 0:22 EmitVertex ( temp void)
0:16 Function Definition: main( ( temp void) 0:16 Function Definition: main( ( temp void)
0:16 Function Parameters: 0:16 Function Parameters:
@ -130,15 +175,16 @@ output primitive = triangle_strip
0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Linker Objects 0:? Linker Objects
0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 47 // Id's are bound by 61
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 40 EntryPoint Geometry 4 "main" 38 43 53
ExecutionMode 4 InputLines ExecutionMode 4 InputLines
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
@ -156,12 +202,19 @@ output primitive = triangle_strip
Name 17 "vin" Name 17 "vin"
Name 18 "outStream" Name 18 "outStream"
Name 21 "vout" Name 21 "vout"
Name 38 "vin" Name 38 "outStream_position"
Name 40 "vin" Name 41 "PS_IN"
Name 42 "outStream" MemberName 41(PS_IN) 0 "color"
Name 43 "param" MemberName 41(PS_IN) 1 "uv"
Name 45 "param" Name 43 "outStream"
Decorate 40(vin) Location 0 Name 51 "vin"
Name 53 "vin"
Name 55 "outStream"
Name 56 "param"
Name 58 "param"
Decorate 38(outStream_position) BuiltIn Position
Decorate 43(outStream) Location 0
Decorate 53(vin) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -181,19 +234,27 @@ output primitive = triangle_strip
28: 22(int) Constant 2 28: 22(int) Constant 2
29: TypePointer Function 8(fvec2) 29: TypePointer Function 8(fvec2)
33: 22(int) Constant 0 33: 22(int) Constant 0
39: TypePointer Input 12 37: TypePointer Output 7(fvec4)
40(vin): 39(ptr) Variable Input 38(outStream_position): 37(ptr) Variable Output
41(PS_IN): TypeStruct 7(fvec4) 8(fvec2)
42: TypePointer Output 41(PS_IN)
43(outStream): 42(ptr) Variable Output
49: TypePointer Output 8(fvec2)
52: TypePointer Input 12
53(vin): 52(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
38(vin): 13(ptr) Variable Function 51(vin): 13(ptr) Variable Function
42(outStream): 15(ptr) Variable Function 55(outStream): 15(ptr) Variable Function
43(param): 13(ptr) Variable Function 56(param): 13(ptr) Variable Function
45(param): 15(ptr) Variable Function 58(param): 15(ptr) Variable Function
41: 12 Load 40(vin) 54: 12 Load 53(vin)
Store 38(vin) 41 Store 51(vin) 54
44: 12 Load 38(vin) 57: 12 Load 51(vin)
Store 43(param) 44 Store 56(param) 57
46: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 43(param) 45(param) 59: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 56(param) 58(param)
60: 14(PS_IN) Load 58(param)
Store 55(outStream) 60
Return Return
FunctionEnd FunctionEnd
19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;): 2 Function None 16 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;): 2 Function None 16
@ -213,8 +274,17 @@ output primitive = triangle_strip
35: 7(fvec4) Load 34 35: 7(fvec4) Load 34
36: 24(ptr) AccessChain 21(vout) 33 36: 24(ptr) AccessChain 21(vout) 33
Store 36 35 Store 36 35
37: 14(PS_IN) Load 21(vout) 39: 24(ptr) AccessChain 21(vout) 33
Store 18(outStream) 37 40: 7(fvec4) Load 39
Store 38(outStream_position) 40
44: 24(ptr) AccessChain 21(vout) 23
45: 7(fvec4) Load 44
46: 37(ptr) AccessChain 43(outStream) 33
Store 46 45
47: 29(ptr) AccessChain 21(vout) 28
48: 8(fvec2) Load 47
50: 49(ptr) AccessChain 43(outStream) 23
Store 50 48
EmitVertex EmitVertex
Return Return
FunctionEnd FunctionEnd

View File

@ -219,6 +219,7 @@ enum TBuiltInVariable {
EbvFragDepthGreater, EbvFragDepthGreater,
EbvFragDepthLesser, EbvFragDepthLesser,
EbvStencilRef, EbvStencilRef,
EbvGsOutputStream,
EbvLast EbvLast
}; };

View File

@ -611,12 +611,15 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList)
qualifier.layoutFormat = type.getQualifier().layoutFormat; qualifier.layoutFormat = type.getQualifier().layoutFormat;
qualifier.precision = type.getQualifier().precision; qualifier.precision = type.getQualifier().precision;
if (type.getQualifier().storage == EvqVaryingOut || if (type.getQualifier().storage == EvqOut ||
type.getQualifier().storage == EvqBuffer) { type.getQualifier().storage == EvqBuffer) {
qualifier.storage = type.getQualifier().storage; qualifier.storage = type.getQualifier().storage;
qualifier.readonly = type.getQualifier().readonly; qualifier.readonly = type.getQualifier().readonly;
} }
if (type.getQualifier().builtIn != EbvNone)
qualifier.builtIn = type.getQualifier().builtIn;
type.getQualifier() = qualifier; type.getQualifier() = qualifier;
} }
@ -1035,7 +1038,8 @@ bool HlslGrammar::acceptStreamOutTemplateType(TType& type, TLayoutGeometry& geom
return false; return false;
} }
type.getQualifier().storage = EvqVaryingOut; type.getQualifier().storage = EvqOut;
type.getQualifier().builtIn = EbvGsOutputStream;
if (! acceptTokenClass(EHTokRightAngle)) { if (! acceptTokenClass(EHTokRightAngle)) {
expected("right angle bracket"); expected("right angle bracket");

View File

@ -66,7 +66,8 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
nextInLocation(0), nextOutLocation(0), nextInLocation(0), nextOutLocation(0),
sourceEntryPointName(sourceEntryPointName), sourceEntryPointName(sourceEntryPointName),
entryPointFunction(nullptr), entryPointFunction(nullptr),
entryPointFunctionBody(nullptr) entryPointFunctionBody(nullptr),
gsStreamOutput(nullptr)
{ {
globalUniformDefaults.clear(); globalUniformDefaults.clear();
globalUniformDefaults.layoutMatrix = ElmRowMajor; globalUniformDefaults.layoutMatrix = ElmRowMajor;
@ -1852,11 +1853,15 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
TIntermAggregate* synthBody = new TIntermAggregate(); TIntermAggregate* synthBody = new TIntermAggregate();
auto inputIt = inputs.begin(); auto inputIt = inputs.begin();
TIntermTyped* callingArgs = nullptr; TIntermTyped* callingArgs = nullptr;
for (int i = 0; i < userFunction.getParamCount(); i++) { for (int i = 0; i < userFunction.getParamCount(); i++) {
TParameter& param = userFunction[i]; TParameter& param = userFunction[i];
argVars.push_back(makeInternalVariable(*param.name, *param.type)); argVars.push_back(makeInternalVariable(*param.name, *param.type));
argVars.back()->getWritableType().getQualifier().makeTemporary(); argVars.back()->getWritableType().getQualifier().makeTemporary();
TIntermSymbol* arg = intermediate.addSymbol(*argVars.back()); TIntermSymbol* arg = intermediate.addSymbol(*argVars.back());
handleFunctionArgument(&callee, callingArgs, arg); handleFunctionArgument(&callee, callingArgs, arg);
if (param.type->getQualifier().isParamInput()) { if (param.type->getQualifier().isParamInput()) {
intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign, arg, intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign, arg,
@ -1911,10 +1916,20 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
auto outputIt = outputs.begin(); auto outputIt = outputs.begin();
for (int i = 0; i < userFunction.getParamCount(); i++) { for (int i = 0; i < userFunction.getParamCount(); i++) {
TParameter& param = userFunction[i]; TParameter& param = userFunction[i];
// GS outputs are via emit, so we do not copy them here.
if (param.type->getQualifier().isParamOutput()) { if (param.type->getQualifier().isParamOutput()) {
if (param.declaredBuiltIn == EbvGsOutputStream) {
// GS output stream does not assign outputs here: it's the Append() method
// which writes to the output, probably multiple times separated by Emit.
// We merely remember the output to use, here.
gsStreamOutput = *outputIt;
} else {
intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign, intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign,
intermediate.addSymbol(**outputIt), intermediate.addSymbol(**outputIt),
intermediate.addSymbol(*argVars[i]))); intermediate.addSymbol(*argVars[i])));
}
outputIt++; outputIt++;
} }
} }
@ -3301,9 +3316,15 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy
emit->setLoc(loc); emit->setLoc(loc);
emit->setType(TType(EbtVoid)); emit->setType(TType(EbtVoid));
// find the matching output
if (gsStreamOutput == nullptr) {
error(loc, "unable to find output symbol for Append()", "", "");
return;
}
sequence = intermediate.growAggregate(sequence, sequence = intermediate.growAggregate(sequence,
handleAssign(loc, EOpAssign, handleAssign(loc, EOpAssign,
argAggregate->getSequence()[0]->getAsTyped(), intermediate.addSymbol(*gsStreamOutput, loc),
argAggregate->getSequence()[1]->getAsTyped()), argAggregate->getSequence()[1]->getAsTyped()),
loc); loc);

View File

@ -405,6 +405,8 @@ protected:
TVector<TString> currentTypePrefix; // current scoping prefix for nested structures TVector<TString> currentTypePrefix; // current scoping prefix for nested structures
TVector<TVariable*> implicitThisStack; // currently active 'this' variables for nested structures TVector<TVariable*> implicitThisStack; // currently active 'this' variables for nested structures
TVariable* gsStreamOutput; // geometry shader stream outputs, for emit (Append method)
}; };
// This is the prefix we use for builtin methods to avoid namespace collisions with // This is the prefix we use for builtin methods to avoid namespace collisions with