SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl).
This commit is contained in:
@@ -7,26 +7,28 @@ Linked fragment stage:
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 144
|
||||
// Id's are bound by 147
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 12 24
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
EntryPoint Fragment 4 "main" 12 24 34 113 140 142
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 8 "foo("
|
||||
Name 12 "of1"
|
||||
Name 24 "of4"
|
||||
Name 27 "ub"
|
||||
Name 31 "ui"
|
||||
Name 41 "uba"
|
||||
Name 110 "uf"
|
||||
Name 137 "uiv4"
|
||||
Name 139 "uv4"
|
||||
Name 142 "ub41"
|
||||
Name 143 "ub42"
|
||||
Name 34 "ui"
|
||||
Name 44 "uba"
|
||||
Name 113 "uf"
|
||||
Name 140 "uiv4"
|
||||
Name 142 "uv4"
|
||||
Name 145 "ub41"
|
||||
Name 146 "ub42"
|
||||
Decorate 34(ui) Flat
|
||||
Decorate 140(uiv4) Flat
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeBool
|
||||
@@ -41,185 +43,191 @@ Linked fragment stage:
|
||||
23: TypePointer Output 22(fvec4)
|
||||
24(of4): 23(ptr) Variable Output
|
||||
25: 22(fvec4) ConstantComposite 21 21 21 21
|
||||
26: TypePointer UniformConstant 6(bool)
|
||||
27(ub): 26(ptr) Variable UniformConstant
|
||||
29: TypeInt 32 1
|
||||
30: TypePointer UniformConstant 29(int)
|
||||
31(ui): 30(ptr) Variable UniformConstant
|
||||
33: 29(int) Constant 2
|
||||
41(uba): 26(ptr) Variable UniformConstant
|
||||
109: TypePointer UniformConstant 10(float)
|
||||
110(uf): 109(ptr) Variable UniformConstant
|
||||
113: 10(float) Constant 1082130432
|
||||
135: TypeVector 29(int) 4
|
||||
136: TypePointer UniformConstant 135(ivec4)
|
||||
137(uiv4): 136(ptr) Variable UniformConstant
|
||||
138: TypePointer UniformConstant 22(fvec4)
|
||||
139(uv4): 138(ptr) Variable UniformConstant
|
||||
140: TypeVector 6(bool) 4
|
||||
141: TypePointer UniformConstant 140(bvec4)
|
||||
142(ub41): 141(ptr) Variable UniformConstant
|
||||
143(ub42): 141(ptr) Variable UniformConstant
|
||||
26: TypePointer Private 6(bool)
|
||||
27(ub): 26(ptr) Variable Private
|
||||
32: TypeInt 32 1
|
||||
33: TypePointer Input 32(int)
|
||||
34(ui): 33(ptr) Variable Input
|
||||
36: 32(int) Constant 2
|
||||
44(uba): 26(ptr) Variable Private
|
||||
112: TypePointer Input 10(float)
|
||||
113(uf): 112(ptr) Variable Input
|
||||
116: 10(float) Constant 1082130432
|
||||
138: TypeVector 32(int) 4
|
||||
139: TypePointer Input 138(ivec4)
|
||||
140(uiv4): 139(ptr) Variable Input
|
||||
141: TypePointer Input 22(fvec4)
|
||||
142(uv4): 141(ptr) Variable Input
|
||||
143: TypeVector 6(bool) 4
|
||||
144: TypePointer Private 143(bvec4)
|
||||
145(ub41): 144(ptr) Variable Private
|
||||
146(ub42): 144(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 12(of1) 21
|
||||
Store 24(of4) 25
|
||||
28: 6(bool) Load 27(ub)
|
||||
32: 29(int) Load 31(ui)
|
||||
34: 6(bool) SGreaterThan 32 33
|
||||
35: 6(bool) LogicalOr 28 34
|
||||
SelectionMerge 37 None
|
||||
BranchConditional 35 36 37
|
||||
36: Label
|
||||
38: 10(float) Load 12(of1)
|
||||
39: 10(float) FAdd 38 14
|
||||
Store 12(of1) 39
|
||||
Branch 37
|
||||
37: Label
|
||||
40: 6(bool) Load 27(ub)
|
||||
42: 6(bool) Load 41(uba)
|
||||
43: 6(bool) LogicalNot 42
|
||||
44: 6(bool) LogicalAnd 40 43
|
||||
SelectionMerge 46 None
|
||||
BranchConditional 44 45 46
|
||||
45: Label
|
||||
47: 10(float) Load 12(of1)
|
||||
48: 10(float) FAdd 47 14
|
||||
Store 12(of1) 48
|
||||
Branch 46
|
||||
46: Label
|
||||
49: 6(bool) Load 27(ub)
|
||||
50: 6(bool) LogicalNot 49
|
||||
SelectionMerge 52 None
|
||||
BranchConditional 50 51 52
|
||||
51: Label
|
||||
53: 6(bool) FunctionCall 8(foo()
|
||||
Branch 52
|
||||
52: Label
|
||||
54: 6(bool) Phi 49 46 53 51
|
||||
SelectionMerge 56 None
|
||||
BranchConditional 54 55 56
|
||||
55: Label
|
||||
57: 10(float) Load 12(of1)
|
||||
58: 10(float) FAdd 57 14
|
||||
Store 12(of1) 58
|
||||
Branch 56
|
||||
56: Label
|
||||
59: 6(bool) Load 27(ub)
|
||||
SelectionMerge 61 None
|
||||
BranchConditional 59 60 61
|
||||
60: Label
|
||||
62: 6(bool) FunctionCall 8(foo()
|
||||
Branch 61
|
||||
61: Label
|
||||
63: 6(bool) Phi 59 56 62 60
|
||||
SelectionMerge 65 None
|
||||
BranchConditional 63 64 65
|
||||
64: Label
|
||||
66: 10(float) Load 12(of1)
|
||||
67: 10(float) FAdd 66 14
|
||||
Store 12(of1) 67
|
||||
Branch 65
|
||||
65: Label
|
||||
68: 6(bool) FunctionCall 8(foo()
|
||||
69: 6(bool) Load 27(ub)
|
||||
70: 6(bool) LogicalOr 68 69
|
||||
SelectionMerge 72 None
|
||||
BranchConditional 70 71 72
|
||||
71: Label
|
||||
73: 10(float) Load 12(of1)
|
||||
74: 10(float) FAdd 73 14
|
||||
Store 12(of1) 74
|
||||
Branch 72
|
||||
72: Label
|
||||
75: 6(bool) FunctionCall 8(foo()
|
||||
76: 6(bool) Load 27(ub)
|
||||
77: 6(bool) LogicalAnd 75 76
|
||||
SelectionMerge 79 None
|
||||
BranchConditional 77 78 79
|
||||
78: Label
|
||||
80: 10(float) Load 12(of1)
|
||||
81: 10(float) FAdd 80 14
|
||||
Store 12(of1) 81
|
||||
Branch 79
|
||||
79: Label
|
||||
82: 6(bool) Load 27(ub)
|
||||
83: 6(bool) LogicalNot 82
|
||||
SelectionMerge 85 None
|
||||
BranchConditional 83 84 85
|
||||
84: Label
|
||||
86: 10(float) Load 12(of1)
|
||||
87: 10(float) FAdd 86 14
|
||||
Store 12(of1) 87
|
||||
88: 6(bool) FOrdGreaterThan 87 14
|
||||
Branch 85
|
||||
85: Label
|
||||
89: 6(bool) Phi 82 79 88 84
|
||||
SelectionMerge 91 None
|
||||
BranchConditional 89 90 91
|
||||
90: Label
|
||||
92: 22(fvec4) Load 24(of4)
|
||||
93: 22(fvec4) CompositeConstruct 14 14 14 14
|
||||
94: 22(fvec4) FAdd 92 93
|
||||
Store 24(of4) 94
|
||||
Branch 91
|
||||
91: Label
|
||||
95: 10(float) Load 12(of1)
|
||||
96: 10(float) FAdd 95 14
|
||||
Store 12(of1) 96
|
||||
97: 6(bool) FOrdGreaterThan 96 14
|
||||
98: 6(bool) Load 27(ub)
|
||||
99: 6(bool) LogicalOr 97 98
|
||||
SelectionMerge 101 None
|
||||
BranchConditional 99 100 101
|
||||
100: Label
|
||||
102: 22(fvec4) Load 24(of4)
|
||||
103: 22(fvec4) CompositeConstruct 14 14 14 14
|
||||
104: 22(fvec4) FAdd 102 103
|
||||
Store 24(of4) 104
|
||||
Branch 101
|
||||
101: Label
|
||||
105: 6(bool) Load 27(ub)
|
||||
106: 6(bool) LogicalNot 105
|
||||
SelectionMerge 108 None
|
||||
BranchConditional 106 107 108
|
||||
107: Label
|
||||
111: 10(float) Load 110(uf)
|
||||
112: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 111
|
||||
114: 10(float) FMul 112 113
|
||||
115: 10(float) Load 12(of1)
|
||||
116: 6(bool) FOrdGreaterThan 114 115
|
||||
Branch 108
|
||||
108: Label
|
||||
117: 6(bool) Phi 105 101 116 107
|
||||
SelectionMerge 119 None
|
||||
BranchConditional 117 118 119
|
||||
118: Label
|
||||
120: 10(float) Load 12(of1)
|
||||
121: 10(float) FAdd 120 14
|
||||
Store 12(of1) 121
|
||||
Branch 119
|
||||
119: Label
|
||||
122: 6(bool) Load 27(ub)
|
||||
SelectionMerge 124 None
|
||||
BranchConditional 122 123 124
|
||||
123: Label
|
||||
125: 10(float) Load 110(uf)
|
||||
126: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 125
|
||||
127: 10(float) FMul 126 113
|
||||
128: 10(float) Load 12(of1)
|
||||
129: 6(bool) FOrdGreaterThan 127 128
|
||||
Branch 124
|
||||
124: Label
|
||||
130: 6(bool) Phi 122 119 129 123
|
||||
SelectionMerge 132 None
|
||||
BranchConditional 130 131 132
|
||||
131: Label
|
||||
133: 10(float) Load 12(of1)
|
||||
134: 10(float) FAdd 133 14
|
||||
Store 12(of1) 134
|
||||
Branch 132
|
||||
132: Label
|
||||
29: 6(bool) LogicalNot 28
|
||||
SelectionMerge 31 None
|
||||
BranchConditional 29 30 31
|
||||
30: Label
|
||||
35: 32(int) Load 34(ui)
|
||||
37: 6(bool) SGreaterThan 35 36
|
||||
Branch 31
|
||||
31: Label
|
||||
38: 6(bool) Phi 28 5 37 30
|
||||
SelectionMerge 40 None
|
||||
BranchConditional 38 39 40
|
||||
39: Label
|
||||
41: 10(float) Load 12(of1)
|
||||
42: 10(float) FAdd 41 14
|
||||
Store 12(of1) 42
|
||||
Branch 40
|
||||
40: Label
|
||||
43: 6(bool) Load 27(ub)
|
||||
45: 6(bool) Load 44(uba)
|
||||
46: 6(bool) LogicalNot 45
|
||||
47: 6(bool) LogicalAnd 43 46
|
||||
SelectionMerge 49 None
|
||||
BranchConditional 47 48 49
|
||||
48: Label
|
||||
50: 10(float) Load 12(of1)
|
||||
51: 10(float) FAdd 50 14
|
||||
Store 12(of1) 51
|
||||
Branch 49
|
||||
49: Label
|
||||
52: 6(bool) Load 27(ub)
|
||||
53: 6(bool) LogicalNot 52
|
||||
SelectionMerge 55 None
|
||||
BranchConditional 53 54 55
|
||||
54: Label
|
||||
56: 6(bool) FunctionCall 8(foo()
|
||||
Branch 55
|
||||
55: Label
|
||||
57: 6(bool) Phi 52 49 56 54
|
||||
SelectionMerge 59 None
|
||||
BranchConditional 57 58 59
|
||||
58: Label
|
||||
60: 10(float) Load 12(of1)
|
||||
61: 10(float) FAdd 60 14
|
||||
Store 12(of1) 61
|
||||
Branch 59
|
||||
59: Label
|
||||
62: 6(bool) Load 27(ub)
|
||||
SelectionMerge 64 None
|
||||
BranchConditional 62 63 64
|
||||
63: Label
|
||||
65: 6(bool) FunctionCall 8(foo()
|
||||
Branch 64
|
||||
64: Label
|
||||
66: 6(bool) Phi 62 59 65 63
|
||||
SelectionMerge 68 None
|
||||
BranchConditional 66 67 68
|
||||
67: Label
|
||||
69: 10(float) Load 12(of1)
|
||||
70: 10(float) FAdd 69 14
|
||||
Store 12(of1) 70
|
||||
Branch 68
|
||||
68: Label
|
||||
71: 6(bool) FunctionCall 8(foo()
|
||||
72: 6(bool) Load 27(ub)
|
||||
73: 6(bool) LogicalOr 71 72
|
||||
SelectionMerge 75 None
|
||||
BranchConditional 73 74 75
|
||||
74: Label
|
||||
76: 10(float) Load 12(of1)
|
||||
77: 10(float) FAdd 76 14
|
||||
Store 12(of1) 77
|
||||
Branch 75
|
||||
75: Label
|
||||
78: 6(bool) FunctionCall 8(foo()
|
||||
79: 6(bool) Load 27(ub)
|
||||
80: 6(bool) LogicalAnd 78 79
|
||||
SelectionMerge 82 None
|
||||
BranchConditional 80 81 82
|
||||
81: Label
|
||||
83: 10(float) Load 12(of1)
|
||||
84: 10(float) FAdd 83 14
|
||||
Store 12(of1) 84
|
||||
Branch 82
|
||||
82: Label
|
||||
85: 6(bool) Load 27(ub)
|
||||
86: 6(bool) LogicalNot 85
|
||||
SelectionMerge 88 None
|
||||
BranchConditional 86 87 88
|
||||
87: Label
|
||||
89: 10(float) Load 12(of1)
|
||||
90: 10(float) FAdd 89 14
|
||||
Store 12(of1) 90
|
||||
91: 6(bool) FOrdGreaterThan 90 14
|
||||
Branch 88
|
||||
88: Label
|
||||
92: 6(bool) Phi 85 82 91 87
|
||||
SelectionMerge 94 None
|
||||
BranchConditional 92 93 94
|
||||
93: Label
|
||||
95: 22(fvec4) Load 24(of4)
|
||||
96: 22(fvec4) CompositeConstruct 14 14 14 14
|
||||
97: 22(fvec4) FAdd 95 96
|
||||
Store 24(of4) 97
|
||||
Branch 94
|
||||
94: Label
|
||||
98: 10(float) Load 12(of1)
|
||||
99: 10(float) FAdd 98 14
|
||||
Store 12(of1) 99
|
||||
100: 6(bool) FOrdGreaterThan 99 14
|
||||
101: 6(bool) Load 27(ub)
|
||||
102: 6(bool) LogicalOr 100 101
|
||||
SelectionMerge 104 None
|
||||
BranchConditional 102 103 104
|
||||
103: Label
|
||||
105: 22(fvec4) Load 24(of4)
|
||||
106: 22(fvec4) CompositeConstruct 14 14 14 14
|
||||
107: 22(fvec4) FAdd 105 106
|
||||
Store 24(of4) 107
|
||||
Branch 104
|
||||
104: Label
|
||||
108: 6(bool) Load 27(ub)
|
||||
109: 6(bool) LogicalNot 108
|
||||
SelectionMerge 111 None
|
||||
BranchConditional 109 110 111
|
||||
110: Label
|
||||
114: 10(float) Load 113(uf)
|
||||
115: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 114
|
||||
117: 10(float) FMul 115 116
|
||||
118: 10(float) Load 12(of1)
|
||||
119: 6(bool) FOrdGreaterThan 117 118
|
||||
Branch 111
|
||||
111: Label
|
||||
120: 6(bool) Phi 108 104 119 110
|
||||
SelectionMerge 122 None
|
||||
BranchConditional 120 121 122
|
||||
121: Label
|
||||
123: 10(float) Load 12(of1)
|
||||
124: 10(float) FAdd 123 14
|
||||
Store 12(of1) 124
|
||||
Branch 122
|
||||
122: Label
|
||||
125: 6(bool) Load 27(ub)
|
||||
SelectionMerge 127 None
|
||||
BranchConditional 125 126 127
|
||||
126: Label
|
||||
128: 10(float) Load 113(uf)
|
||||
129: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 128
|
||||
130: 10(float) FMul 129 116
|
||||
131: 10(float) Load 12(of1)
|
||||
132: 6(bool) FOrdGreaterThan 130 131
|
||||
Branch 127
|
||||
127: Label
|
||||
133: 6(bool) Phi 125 122 132 126
|
||||
SelectionMerge 135 None
|
||||
BranchConditional 133 134 135
|
||||
134: Label
|
||||
136: 10(float) Load 12(of1)
|
||||
137: 10(float) FAdd 136 14
|
||||
Store 12(of1) 137
|
||||
Branch 135
|
||||
135: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
8(foo(): 6(bool) Function None 7
|
||||
|
||||
Reference in New Issue
Block a user