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:
@@ -47,9 +47,31 @@ output primitive = triangle_strip
|
||||
0:21 Constant:
|
||||
0:21 0 (const int)
|
||||
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 '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 '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 Sequence
|
||||
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 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:16 Function Definition: main( ( temp void)
|
||||
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:? 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:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
|
||||
|
||||
|
||||
Linked geometry stage:
|
||||
@@ -115,9 +138,31 @@ output primitive = triangle_strip
|
||||
0:21 Constant:
|
||||
0:21 0 (const int)
|
||||
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 '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 '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 Sequence
|
||||
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 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:16 Function Definition: main( ( temp void)
|
||||
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:? 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:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 47
|
||||
// Id's are bound by 61
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 40
|
||||
EntryPoint Geometry 4 "main" 38 43 53
|
||||
ExecutionMode 4 InputLines
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -156,12 +202,19 @@ output primitive = triangle_strip
|
||||
Name 17 "vin"
|
||||
Name 18 "outStream"
|
||||
Name 21 "vout"
|
||||
Name 38 "vin"
|
||||
Name 40 "vin"
|
||||
Name 42 "outStream"
|
||||
Name 43 "param"
|
||||
Name 45 "param"
|
||||
Decorate 40(vin) Location 0
|
||||
Name 38 "outStream_position"
|
||||
Name 41 "PS_IN"
|
||||
MemberName 41(PS_IN) 0 "color"
|
||||
MemberName 41(PS_IN) 1 "uv"
|
||||
Name 43 "outStream"
|
||||
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
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -181,19 +234,27 @@ output primitive = triangle_strip
|
||||
28: 22(int) Constant 2
|
||||
29: TypePointer Function 8(fvec2)
|
||||
33: 22(int) Constant 0
|
||||
39: TypePointer Input 12
|
||||
40(vin): 39(ptr) Variable Input
|
||||
37: TypePointer Output 7(fvec4)
|
||||
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
|
||||
5: Label
|
||||
38(vin): 13(ptr) Variable Function
|
||||
42(outStream): 15(ptr) Variable Function
|
||||
43(param): 13(ptr) Variable Function
|
||||
45(param): 15(ptr) Variable Function
|
||||
41: 12 Load 40(vin)
|
||||
Store 38(vin) 41
|
||||
44: 12 Load 38(vin)
|
||||
Store 43(param) 44
|
||||
46: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 43(param) 45(param)
|
||||
51(vin): 13(ptr) Variable Function
|
||||
55(outStream): 15(ptr) Variable Function
|
||||
56(param): 13(ptr) Variable Function
|
||||
58(param): 15(ptr) Variable Function
|
||||
54: 12 Load 53(vin)
|
||||
Store 51(vin) 54
|
||||
57: 12 Load 51(vin)
|
||||
Store 56(param) 57
|
||||
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
|
||||
FunctionEnd
|
||||
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
|
||||
36: 24(ptr) AccessChain 21(vout) 33
|
||||
Store 36 35
|
||||
37: 14(PS_IN) Load 21(vout)
|
||||
Store 18(outStream) 37
|
||||
39: 24(ptr) AccessChain 21(vout) 33
|
||||
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
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user