HLSL: Flatten structs for all non-arrayed I/O interfaces.

This commit is contained in:
John Kessenich
2017-08-11 00:17:26 -06:00
parent 01109546d8
commit e29ff3cd65
15 changed files with 749 additions and 862 deletions

View File

@@ -73,7 +73,9 @@ output primitive = triangle_strip
0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream.Pos' ( out 4-component vector of float Position)
0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? 'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
0:? 'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
0:? 'OutputStream.VertexID' (layout( location=2) out uint)
Linked geometry stage:
@@ -153,16 +155,18 @@ output primitive = triangle_strip
0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream.Pos' ( out 4-component vector of float Position)
0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? 'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
0:? 'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
0:? 'OutputStream.VertexID' (layout( location=2) out uint)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 79
// Id's are bound by 82
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 66 75 78
EntryPoint Geometry 4 "main" 66 75 77 79 81
ExecutionMode 4 InputPoints
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
@@ -187,14 +191,14 @@ output primitive = triangle_strip
Name 69 "param"
Name 71 "param"
Name 75 "OutputStream.Pos"
Name 76 "PSInput"
MemberName 76(PSInput) 0 "TexCoord"
MemberName 76(PSInput) 1 "TerrainPos"
MemberName 76(PSInput) 2 "VertexID"
Name 78 "OutputStream"
Name 77 "OutputStream.TexCoord"
Name 79 "OutputStream.TerrainPos"
Name 81 "OutputStream.VertexID"
Decorate 66(v) Location 0
Decorate 75(OutputStream.Pos) BuiltIn Position
Decorate 78(OutputStream) Location 0
Decorate 77(OutputStream.TexCoord) Location 0
Decorate 79(OutputStream.TerrainPos) Location 1
Decorate 81(OutputStream.VertexID) Location 2
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -229,9 +233,12 @@ output primitive = triangle_strip
66(v): 65(ptr) Variable Input
74: TypePointer Output 11(fvec4)
75(OutputStream.Pos): 74(ptr) Variable Output
76(PSInput): TypeStruct 12(fvec2) 13(fvec3) 6(int)
77: TypePointer Output 76(PSInput)
78(OutputStream): 77(ptr) Variable Output
76: TypePointer Output 12(fvec2)
77(OutputStream.TexCoord): 76(ptr) Variable Output
78: TypePointer Output 13(fvec3)
79(OutputStream.TerrainPos): 78(ptr) Variable Output
80: TypePointer Output 6(int)
81(OutputStream.VertexID): 80(ptr) Variable Output
4(main): 2 Function None 3
5: Label
64(v): 9(ptr) Variable Function