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