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.
163 lines
8.0 KiB
Plaintext
Executable File
163 lines
8.0 KiB
Plaintext
Executable File
spv.140.frag
|
|
|
|
Linked fragment stage:
|
|
|
|
|
|
// Module Version 99
|
|
// Generated by (magic number): 51a00bb
|
|
// Id's are bound by 92
|
|
|
|
Source GLSL 140
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Fragment 4 "main"
|
|
ExecutionMode 4 OriginLowerLeft
|
|
Name 4 "main"
|
|
Name 8 "foo("
|
|
Name 11 "i1"
|
|
Name 16 "gl_FrontFacing"
|
|
Name 24 "i2"
|
|
Name 28 "o"
|
|
Name 33 "gl_ClipDistance"
|
|
Name 42 "k"
|
|
Name 54 "sampR"
|
|
Name 61 "sampB"
|
|
Name 85 "samp2Da"
|
|
Name 89 "bn"
|
|
MemberName 89(bn) 0 "matra"
|
|
MemberName 89(bn) 1 "matca"
|
|
MemberName 89(bn) 2 "matr"
|
|
MemberName 89(bn) 3 "matc"
|
|
MemberName 89(bn) 4 "matrdef"
|
|
Name 91 ""
|
|
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
|
|
Decorate 33(gl_ClipDistance) Smooth
|
|
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
|
|
Decorate 42(k) Smooth
|
|
Decorate 85(samp2Da) NoStaticUse
|
|
Decorate 88 ArrayStride 64
|
|
Decorate 88 ArrayStride 64
|
|
MemberDecorate 89(bn) 0 RowMajor
|
|
MemberDecorate 89(bn) 0 Offset 0
|
|
MemberDecorate 89(bn) 0 MatrixStride 16
|
|
MemberDecorate 89(bn) 1 ColMajor
|
|
MemberDecorate 89(bn) 1 Offset 256
|
|
MemberDecorate 89(bn) 1 MatrixStride 16
|
|
MemberDecorate 89(bn) 2 RowMajor
|
|
MemberDecorate 89(bn) 2 Offset 512
|
|
MemberDecorate 89(bn) 2 MatrixStride 16
|
|
MemberDecorate 89(bn) 3 ColMajor
|
|
MemberDecorate 89(bn) 3 Offset 576
|
|
MemberDecorate 89(bn) 3 MatrixStride 16
|
|
MemberDecorate 89(bn) 4 RowMajor
|
|
MemberDecorate 89(bn) 4 Offset 640
|
|
MemberDecorate 89(bn) 4 MatrixStride 16
|
|
Decorate 89(bn) Block
|
|
Decorate 91 NoStaticUse
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeFloat 32
|
|
7: TypeFunction 6(float)
|
|
10: TypePointer PrivateGlobal 6(float)
|
|
11(i1): 10(ptr) Variable PrivateGlobal
|
|
12: TypePointer Function 6(float)
|
|
14: TypeBool
|
|
15: TypePointer Input 14(bool)
|
|
16(gl_FrontFacing): 15(ptr) Variable Input
|
|
20: 6(float) Constant 3221225472
|
|
22: 6(float) Constant 1073741824
|
|
24(i2): 10(ptr) Variable PrivateGlobal
|
|
25: 6(float) Constant 1120665600
|
|
26: TypeVector 6(float) 4
|
|
27: TypePointer Output 26(fvec4)
|
|
28(o): 27(ptr) Variable Output
|
|
29: TypeInt 32 0
|
|
30: 29(int) Constant 5
|
|
31: TypeArray 6(float) 30
|
|
32: TypePointer Input 31
|
|
33(gl_ClipDistance): 32(ptr) Variable Input
|
|
34: TypeInt 32 1
|
|
35: 34(int) Constant 2
|
|
36: TypePointer Input 6(float)
|
|
41: TypePointer Input 26(fvec4)
|
|
42(k): 41(ptr) Variable Input
|
|
44: TypeVector 34(int) 4
|
|
51: TypeImage 6(float) Rect sampled format:Unknown
|
|
52: TypeSampledImage 51
|
|
53: TypePointer UniformConstant 52
|
|
54(sampR): 53(ptr) Variable UniformConstant
|
|
56: TypeVector 34(int) 2
|
|
58: TypeImage 34(int) Buffer sampled format:Unknown
|
|
59: TypeSampledImage 58
|
|
60: TypePointer UniformConstant 59
|
|
61(sampB): 60(ptr) Variable UniformConstant
|
|
66: TypeVector 6(float) 2
|
|
69: 6(float) Constant 1120403456
|
|
80: TypeImage 6(float) 2D sampled format:Unknown
|
|
81: TypeSampledImage 80
|
|
82: 29(int) Constant 3
|
|
83: TypeArray 81 82
|
|
84: TypePointer UniformConstant 83
|
|
85(samp2Da): 84(ptr) Variable UniformConstant
|
|
86: TypeMatrix 26(fvec4) 4
|
|
87: 29(int) Constant 4
|
|
88: TypeArray 86 87
|
|
89(bn): TypeStruct 88 88 86 86 86
|
|
90: TypePointer Uniform 89(bn)
|
|
91: 90(ptr) Variable Uniform
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
13: 12(ptr) Variable Function
|
|
17: 14(bool) Load 16(gl_FrontFacing)
|
|
SelectionMerge 19 None
|
|
BranchConditional 17 18 21
|
|
18: Label
|
|
Store 13 20
|
|
Branch 19
|
|
21: Label
|
|
Store 13 22
|
|
Branch 19
|
|
19: Label
|
|
23: 6(float) Load 13
|
|
Store 11(i1) 23
|
|
Store 24(i2) 25
|
|
37: 36(ptr) AccessChain 33(gl_ClipDistance) 35
|
|
38: 6(float) Load 37
|
|
39: 26(fvec4) Load 28(o)
|
|
40: 26(fvec4) CompositeInsert 38 39 1
|
|
Store 28(o) 40
|
|
43: 26(fvec4) Load 42(k)
|
|
45: 44(ivec4) ConvertFToS 43
|
|
46: 34(int) CompositeExtract 45 0
|
|
47: 36(ptr) AccessChain 33(gl_ClipDistance) 46
|
|
48: 6(float) Load 47
|
|
49: 26(fvec4) Load 28(o)
|
|
50: 26(fvec4) CompositeInsert 48 49 2
|
|
Store 28(o) 50
|
|
55: 52 Load 54(sampR)
|
|
57: 56(ivec2) ImageQuerySize 55
|
|
62: 59 Load 61(sampB)
|
|
63: 34(int) ImageQuerySize 62
|
|
64: 56(ivec2) CompositeConstruct 63 63
|
|
65: 56(ivec2) IAdd 57 64
|
|
67: 66(fvec2) ConvertSToF 65
|
|
68: 6(float) CompositeExtract 67 0
|
|
70: 6(float) FDiv 68 69
|
|
71: 26(fvec4) Load 28(o)
|
|
72: 26(fvec4) CompositeInsert 70 71 3
|
|
Store 28(o) 72
|
|
73: 6(float) FunctionCall 8(foo()
|
|
74: 26(fvec4) Load 28(o)
|
|
75: 26(fvec4) CompositeInsert 73 74 2
|
|
Store 28(o) 75
|
|
Return
|
|
FunctionEnd
|
|
8(foo(): 6(float) Function None 7
|
|
9: Label
|
|
76: 6(float) Load 11(i1)
|
|
77: 6(float) Load 24(i2)
|
|
78: 6(float) FAdd 76 77
|
|
ReturnValue 78
|
|
FunctionEnd
|