SPV return from main: Simplify a legacy design such returns are not jumps to exit block.
Structured control-flow rules allow leaving the middle of a construct through a return, but not through a jump to a block that does a return. Addresses issue #58.
This commit is contained in:
parent
5f5b205ce9
commit
e770b3e6cf
74 changed files with 9648 additions and 9816 deletions
|
|
@ -5,7 +5,7 @@ Linked geometry stage:
|
|||
|
||||
// Module Version 99
|
||||
// Generated by (magic number): 51a00bb
|
||||
// Id's are bound by 33
|
||||
// Id's are bound by 32
|
||||
|
||||
Source GLSL 330
|
||||
SourceExtension "GL_ARB_separate_shader_objects"
|
||||
|
|
@ -18,57 +18,55 @@ Linked geometry stage:
|
|||
ExecutionMode 4 OutputTriangleStrip
|
||||
ExecutionMode 4 OutputVertices 3
|
||||
Name 4 "main"
|
||||
Name 12 "gl_PerVertex"
|
||||
MemberName 12(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 12(gl_PerVertex) 1 "gl_ClipDistance"
|
||||
Name 14 ""
|
||||
Name 17 "gl_PerVertex"
|
||||
MemberName 17(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 17(gl_PerVertex) 1 "gl_ClipDistance"
|
||||
Name 21 "gl_in"
|
||||
MemberDecorate 12(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 12(gl_PerVertex) 1 BuiltIn ClipDistance
|
||||
Decorate 12(gl_PerVertex) Block
|
||||
Decorate 12(gl_PerVertex) Stream 0
|
||||
Decorate 14 Stream 0
|
||||
MemberDecorate 17(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 17(gl_PerVertex) 1 BuiltIn ClipDistance
|
||||
Decorate 17(gl_PerVertex) Block
|
||||
Name 11 "gl_PerVertex"
|
||||
MemberName 11(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 11(gl_PerVertex) 1 "gl_ClipDistance"
|
||||
Name 13 ""
|
||||
Name 16 "gl_PerVertex"
|
||||
MemberName 16(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 16(gl_PerVertex) 1 "gl_ClipDistance"
|
||||
Name 20 "gl_in"
|
||||
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 11(gl_PerVertex) 1 BuiltIn ClipDistance
|
||||
Decorate 11(gl_PerVertex) Block
|
||||
Decorate 11(gl_PerVertex) Stream 0
|
||||
Decorate 13 Stream 0
|
||||
MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 16(gl_PerVertex) 1 BuiltIn ClipDistance
|
||||
Decorate 16(gl_PerVertex) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
7: TypeFloat 32
|
||||
8: TypeVector 7(float) 4
|
||||
9: TypeInt 32 0
|
||||
10: 9(int) Constant 1
|
||||
11: TypeArray 7(float) 10
|
||||
12(gl_PerVertex): TypeStruct 8(fvec4) 11
|
||||
13: TypePointer Output 12(gl_PerVertex)
|
||||
14: 13(ptr) Variable Output
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 0
|
||||
17(gl_PerVertex): TypeStruct 8(fvec4) 11
|
||||
18: 9(int) Constant 3
|
||||
19: TypeArray 17(gl_PerVertex) 18
|
||||
20: TypePointer Input 19
|
||||
21(gl_in): 20(ptr) Variable Input
|
||||
22: 15(int) Constant 1
|
||||
23: TypePointer Input 8(fvec4)
|
||||
26: TypePointer Output 8(fvec4)
|
||||
28: TypePointer Input 7(float)
|
||||
31: TypePointer Output 7(float)
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeInt 32 0
|
||||
9: 8(int) Constant 1
|
||||
10: TypeArray 6(float) 9
|
||||
11(gl_PerVertex): TypeStruct 7(fvec4) 10
|
||||
12: TypePointer Output 11(gl_PerVertex)
|
||||
13: 12(ptr) Variable Output
|
||||
14: TypeInt 32 1
|
||||
15: 14(int) Constant 0
|
||||
16(gl_PerVertex): TypeStruct 7(fvec4) 10
|
||||
17: 8(int) Constant 3
|
||||
18: TypeArray 16(gl_PerVertex) 17
|
||||
19: TypePointer Input 18
|
||||
20(gl_in): 19(ptr) Variable Input
|
||||
21: 14(int) Constant 1
|
||||
22: TypePointer Input 7(fvec4)
|
||||
25: TypePointer Output 7(fvec4)
|
||||
27: TypePointer Input 6(float)
|
||||
30: TypePointer Output 6(float)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
24: 23(ptr) AccessChain 21(gl_in) 22 16
|
||||
25: 8(fvec4) Load 24
|
||||
27: 26(ptr) AccessChain 14 16
|
||||
Store 27 25
|
||||
29: 28(ptr) AccessChain 21(gl_in) 22 22 16
|
||||
30: 7(float) Load 29
|
||||
32: 31(ptr) AccessChain 14 22 16
|
||||
Store 32 30
|
||||
23: 22(ptr) AccessChain 20(gl_in) 21 15
|
||||
24: 7(fvec4) Load 23
|
||||
26: 25(ptr) AccessChain 13 15
|
||||
Store 26 24
|
||||
28: 27(ptr) AccessChain 20(gl_in) 21 21 15
|
||||
29: 6(float) Load 28
|
||||
31: 30(ptr) AccessChain 13 21 15
|
||||
Store 31 29
|
||||
EmitVertex
|
||||
EndPrimitive
|
||||
Branch 6
|
||||
6: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue