HLSL: fix GS implementation for EP wrapping
The prior implementation of GS did not work with the new EP wrapping architecture. This fixes it: the Append() method now looks up the actual output rather than the internal sanitized temporary type, and writes to that.
This commit is contained in:
parent
2184c2f21a
commit
08e0c086c8
10 changed files with 494 additions and 237 deletions
|
|
@ -35,9 +35,40 @@ output primitive = triangle_strip
|
|||
0:? 5.000000
|
||||
0:? 6.000000
|
||||
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 '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 '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 Sequence
|
||||
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 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:24 Function Definition: main( ( temp void)
|
||||
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:? Linker Objects
|
||||
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:
|
||||
|
|
@ -170,9 +202,40 @@ output primitive = triangle_strip
|
|||
0:? 5.000000
|
||||
0:? 6.000000
|
||||
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 '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 '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 Sequence
|
||||
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 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:24 Function Definition: main( ( temp void)
|
||||
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:? Linker Objects
|
||||
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
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 75
|
||||
// Id's are bound by 99
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 44 52
|
||||
EntryPoint Geometry 4 "main" 41 48 67 75
|
||||
ExecutionMode 4 Triangles
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
|
|
@ -291,16 +355,28 @@ output primitive = triangle_strip
|
|||
Name 21 "tin"
|
||||
Name 22 "ts"
|
||||
Name 25 "o"
|
||||
Name 41 "tin"
|
||||
Name 44 "tin_pos"
|
||||
Name 49 "PS_IN"
|
||||
MemberName 49(PS_IN) 0 "tc"
|
||||
Name 52 "tin"
|
||||
Name 70 "ts"
|
||||
Name 71 "param"
|
||||
Name 73 "param"
|
||||
Decorate 44(tin_pos) BuiltIn Position
|
||||
Decorate 52(tin) Location 0
|
||||
Name 41 "ts_psIn_pos"
|
||||
Name 44 "PS_IN"
|
||||
MemberName 44(PS_IN) 0 "tc"
|
||||
Name 45 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
|
||||
MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
|
||||
MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
|
||||
Name 46 "GS_OUT"
|
||||
MemberName 46(GS_OUT) 0 "psIn"
|
||||
MemberName 46(GS_OUT) 1 "contains_no_builtin_io"
|
||||
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
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -330,49 +406,63 @@ output primitive = triangle_strip
|
|||
36: 6(float) Constant 1086324736
|
||||
37: 8(fvec2) ConstantComposite 35 36
|
||||
38: TypePointer Function 8(fvec2)
|
||||
42: TypeArray 7(fvec4) 11
|
||||
43: TypePointer Input 42
|
||||
44(tin_pos): 43(ptr) Variable Input
|
||||
45: TypePointer Input 7(fvec4)
|
||||
49(PS_IN): TypeStruct 8(fvec2)
|
||||
50: TypeArray 49(PS_IN) 11
|
||||
51: TypePointer Input 50
|
||||
52(tin): 51(ptr) Variable Input
|
||||
53: TypePointer Input 8(fvec2)
|
||||
63: 16(int) Constant 2
|
||||
40: TypePointer Output 7(fvec4)
|
||||
41(ts_psIn_pos): 40(ptr) Variable Output
|
||||
44(PS_IN): TypeStruct 8(fvec2)
|
||||
45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 15 16(int)
|
||||
46(GS_OUT): TypeStruct 44(PS_IN) 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
|
||||
47: TypePointer Output 46(GS_OUT)
|
||||
48(ts): 47(ptr) Variable Output
|
||||
51: TypePointer Output 8(fvec2)
|
||||
53: TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
|
||||
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
|
||||
5: Label
|
||||
41(tin): 13(ptr) Variable Function
|
||||
70(ts): 19(ptr) Variable Function
|
||||
71(param): 13(ptr) Variable Function
|
||||
73(param): 19(ptr) Variable Function
|
||||
46: 45(ptr) AccessChain 44(tin_pos) 26
|
||||
47: 7(fvec4) Load 46
|
||||
48: 32(ptr) AccessChain 41(tin) 26 26
|
||||
Store 48 47
|
||||
54: 53(ptr) AccessChain 52(tin) 26 26
|
||||
55: 8(fvec2) Load 54
|
||||
56: 38(ptr) AccessChain 41(tin) 26 34
|
||||
Store 56 55
|
||||
57: 45(ptr) AccessChain 44(tin_pos) 34
|
||||
58: 7(fvec4) Load 57
|
||||
59: 32(ptr) AccessChain 41(tin) 34 26
|
||||
Store 59 58
|
||||
60: 53(ptr) AccessChain 52(tin) 34 26
|
||||
61: 8(fvec2) Load 60
|
||||
62: 38(ptr) AccessChain 41(tin) 34 34
|
||||
Store 62 61
|
||||
64: 45(ptr) AccessChain 44(tin_pos) 63
|
||||
65: 7(fvec4) Load 64
|
||||
66: 32(ptr) AccessChain 41(tin) 63 26
|
||||
Store 66 65
|
||||
67: 53(ptr) AccessChain 52(tin) 63 26
|
||||
68: 8(fvec2) Load 67
|
||||
69: 38(ptr) AccessChain 41(tin) 63 34
|
||||
Store 69 68
|
||||
72: 12 Load 41(tin)
|
||||
Store 71(param) 72
|
||||
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)
|
||||
64(tin): 13(ptr) Variable Function
|
||||
93(ts): 19(ptr) Variable Function
|
||||
94(param): 13(ptr) Variable Function
|
||||
96(param): 19(ptr) Variable Function
|
||||
69: 68(ptr) AccessChain 67(tin_pos) 26
|
||||
70: 7(fvec4) Load 69
|
||||
71: 32(ptr) AccessChain 64(tin) 26 26
|
||||
Store 71 70
|
||||
77: 76(ptr) AccessChain 75(tin) 26 26
|
||||
78: 8(fvec2) Load 77
|
||||
79: 38(ptr) AccessChain 64(tin) 26 34
|
||||
Store 79 78
|
||||
80: 68(ptr) AccessChain 67(tin_pos) 34
|
||||
81: 7(fvec4) Load 80
|
||||
82: 32(ptr) AccessChain 64(tin) 34 26
|
||||
Store 82 81
|
||||
83: 76(ptr) AccessChain 75(tin) 34 26
|
||||
84: 8(fvec2) Load 83
|
||||
85: 38(ptr) AccessChain 64(tin) 34 34
|
||||
Store 85 84
|
||||
87: 68(ptr) AccessChain 67(tin_pos) 86
|
||||
88: 7(fvec4) Load 87
|
||||
89: 32(ptr) AccessChain 64(tin) 86 26
|
||||
Store 89 88
|
||||
90: 76(ptr) AccessChain 75(tin) 86 26
|
||||
91: 8(fvec2) Load 90
|
||||
92: 38(ptr) AccessChain 64(tin) 86 34
|
||||
Store 92 91
|
||||
95: 12 Load 64(tin)
|
||||
Store 94(param) 95
|
||||
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
|
||||
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
|
||||
|
|
@ -384,8 +474,22 @@ output primitive = triangle_strip
|
|||
Store 33 31
|
||||
39: 38(ptr) AccessChain 25(o) 26 34
|
||||
Store 39 37
|
||||
40: 18(GS_OUT) Load 25(o)
|
||||
Store 22(ts) 40
|
||||
42: 32(ptr) AccessChain 25(o) 26 26
|
||||
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
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue