SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl).
This commit is contained in:
@@ -5,30 +5,32 @@ Linked fragment stage:
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 132
|
||||
// Id's are bound by 131
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 11 37 105
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
EntryPoint Fragment 4 "main" 11 24 28 36 53 104
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 140
|
||||
Name 4 "main"
|
||||
Name 9 "color"
|
||||
Name 11 "BaseColor"
|
||||
Name 15 "i"
|
||||
Name 24 "Count"
|
||||
Name 29 "bigColor"
|
||||
Name 37 "gl_FragColor"
|
||||
Name 40 "sum"
|
||||
Name 42 "i"
|
||||
Name 54 "v4"
|
||||
Name 64 "i"
|
||||
Name 72 "tv4"
|
||||
Name 89 "r"
|
||||
Name 95 "i"
|
||||
Name 105 "f"
|
||||
Name 118 "i"
|
||||
Name 28 "bigColor"
|
||||
Name 36 "gl_FragColor"
|
||||
Name 39 "sum"
|
||||
Name 41 "i"
|
||||
Name 53 "v4"
|
||||
Name 63 "i"
|
||||
Name 71 "tv4"
|
||||
Name 88 "r"
|
||||
Name 94 "i"
|
||||
Name 104 "f"
|
||||
Name 117 "i"
|
||||
Decorate 24(Count) Flat
|
||||
Decorate 53(v4) Flat
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -39,39 +41,38 @@ Linked fragment stage:
|
||||
13: TypeInt 32 1
|
||||
14: TypePointer Function 13(int)
|
||||
16: 13(int) Constant 0
|
||||
23: TypePointer UniformConstant 13(int)
|
||||
24(Count): 23(ptr) Variable UniformConstant
|
||||
23: TypePointer Input 13(int)
|
||||
24(Count): 23(ptr) Variable Input
|
||||
26: TypeBool
|
||||
28: TypePointer UniformConstant 7(fvec4)
|
||||
29(bigColor): 28(ptr) Variable UniformConstant
|
||||
34: 13(int) Constant 1
|
||||
36: TypePointer Output 7(fvec4)
|
||||
37(gl_FragColor): 36(ptr) Variable Output
|
||||
39: TypePointer Function 6(float)
|
||||
41: 6(float) Constant 0
|
||||
49: 13(int) Constant 4
|
||||
51: TypeInt 32 0
|
||||
52: TypeVector 51(int) 4
|
||||
53: TypePointer UniformConstant 52(ivec4)
|
||||
54(v4): 53(ptr) Variable UniformConstant
|
||||
56: TypePointer UniformConstant 51(int)
|
||||
77: 51(int) Constant 4
|
||||
90: TypeVector 6(float) 3
|
||||
104: TypePointer Input 6(float)
|
||||
105(f): 104(ptr) Variable Input
|
||||
107: 51(int) Constant 3
|
||||
125: 13(int) Constant 16
|
||||
28(bigColor): 10(ptr) Variable Input
|
||||
33: 13(int) Constant 1
|
||||
35: TypePointer Output 7(fvec4)
|
||||
36(gl_FragColor): 35(ptr) Variable Output
|
||||
38: TypePointer Function 6(float)
|
||||
40: 6(float) Constant 0
|
||||
48: 13(int) Constant 4
|
||||
50: TypeInt 32 0
|
||||
51: TypeVector 50(int) 4
|
||||
52: TypePointer Input 51(ivec4)
|
||||
53(v4): 52(ptr) Variable Input
|
||||
55: TypePointer Input 50(int)
|
||||
76: 50(int) Constant 4
|
||||
89: TypeVector 6(float) 3
|
||||
103: TypePointer Input 6(float)
|
||||
104(f): 103(ptr) Variable Input
|
||||
106: 50(int) Constant 3
|
||||
124: 13(int) Constant 16
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(color): 8(ptr) Variable Function
|
||||
15(i): 14(ptr) Variable Function
|
||||
40(sum): 39(ptr) Variable Function
|
||||
42(i): 14(ptr) Variable Function
|
||||
64(i): 14(ptr) Variable Function
|
||||
72(tv4): 8(ptr) Variable Function
|
||||
89(r): 8(ptr) Variable Function
|
||||
95(i): 14(ptr) Variable Function
|
||||
118(i): 14(ptr) Variable Function
|
||||
39(sum): 38(ptr) Variable Function
|
||||
41(i): 14(ptr) Variable Function
|
||||
63(i): 14(ptr) Variable Function
|
||||
71(tv4): 8(ptr) Variable Function
|
||||
88(r): 8(ptr) Variable Function
|
||||
94(i): 14(ptr) Variable Function
|
||||
117(i): 14(ptr) Variable Function
|
||||
12: 7(fvec4) Load 11(BaseColor)
|
||||
Store 9(color) 12
|
||||
Store 15(i) 16
|
||||
@@ -85,130 +86,130 @@ Linked fragment stage:
|
||||
27: 26(bool) SLessThan 22 25
|
||||
BranchConditional 27 18 19
|
||||
18: Label
|
||||
30: 7(fvec4) Load 29(bigColor)
|
||||
31: 7(fvec4) Load 9(color)
|
||||
32: 7(fvec4) FAdd 31 30
|
||||
Store 9(color) 32
|
||||
29: 7(fvec4) Load 28(bigColor)
|
||||
30: 7(fvec4) Load 9(color)
|
||||
31: 7(fvec4) FAdd 30 29
|
||||
Store 9(color) 31
|
||||
Branch 20
|
||||
20: Label
|
||||
33: 13(int) Load 15(i)
|
||||
35: 13(int) IAdd 33 34
|
||||
Store 15(i) 35
|
||||
32: 13(int) Load 15(i)
|
||||
34: 13(int) IAdd 32 33
|
||||
Store 15(i) 34
|
||||
Branch 17
|
||||
19: Label
|
||||
38: 7(fvec4) Load 9(color)
|
||||
Store 37(gl_FragColor) 38
|
||||
Store 40(sum) 41
|
||||
Store 42(i) 16
|
||||
Branch 43
|
||||
43: Label
|
||||
LoopMerge 45 46 None
|
||||
Branch 47
|
||||
47: Label
|
||||
48: 13(int) Load 42(i)
|
||||
50: 26(bool) SLessThan 48 49
|
||||
BranchConditional 50 44 45
|
||||
44: Label
|
||||
55: 13(int) Load 42(i)
|
||||
57: 56(ptr) AccessChain 54(v4) 55
|
||||
58: 51(int) Load 57
|
||||
59: 6(float) ConvertUToF 58
|
||||
60: 6(float) Load 40(sum)
|
||||
61: 6(float) FAdd 60 59
|
||||
Store 40(sum) 61
|
||||
Branch 46
|
||||
46: Label
|
||||
62: 13(int) Load 42(i)
|
||||
63: 13(int) IAdd 62 34
|
||||
Store 42(i) 63
|
||||
Branch 43
|
||||
45: Label
|
||||
Store 64(i) 16
|
||||
Branch 65
|
||||
65: Label
|
||||
LoopMerge 67 68 None
|
||||
Branch 69
|
||||
69: Label
|
||||
70: 13(int) Load 64(i)
|
||||
71: 26(bool) SLessThan 70 49
|
||||
BranchConditional 71 66 67
|
||||
66: Label
|
||||
73: 13(int) Load 64(i)
|
||||
74: 13(int) Load 64(i)
|
||||
75: 56(ptr) AccessChain 54(v4) 74
|
||||
76: 51(int) Load 75
|
||||
78: 51(int) IMul 76 77
|
||||
79: 6(float) ConvertUToF 78
|
||||
80: 39(ptr) AccessChain 72(tv4) 73
|
||||
Store 80 79
|
||||
Branch 68
|
||||
68: Label
|
||||
81: 13(int) Load 64(i)
|
||||
82: 13(int) IAdd 81 34
|
||||
Store 64(i) 82
|
||||
Branch 65
|
||||
67: Label
|
||||
83: 6(float) Load 40(sum)
|
||||
84: 7(fvec4) CompositeConstruct 83 83 83 83
|
||||
85: 7(fvec4) Load 72(tv4)
|
||||
86: 7(fvec4) FAdd 84 85
|
||||
87: 7(fvec4) Load 37(gl_FragColor)
|
||||
88: 7(fvec4) FAdd 87 86
|
||||
Store 37(gl_FragColor) 88
|
||||
91: 7(fvec4) Load 11(BaseColor)
|
||||
92: 90(fvec3) VectorShuffle 91 91 0 1 2
|
||||
93: 7(fvec4) Load 89(r)
|
||||
94: 7(fvec4) VectorShuffle 93 92 4 5 6 3
|
||||
Store 89(r) 94
|
||||
Store 95(i) 16
|
||||
Branch 96
|
||||
96: Label
|
||||
LoopMerge 98 99 None
|
||||
Branch 100
|
||||
100: Label
|
||||
101: 13(int) Load 95(i)
|
||||
102: 13(int) Load 24(Count)
|
||||
103: 26(bool) SLessThan 101 102
|
||||
BranchConditional 103 97 98
|
||||
97: Label
|
||||
106: 6(float) Load 105(f)
|
||||
108: 39(ptr) AccessChain 89(r) 107
|
||||
Store 108 106
|
||||
Branch 99
|
||||
99: Label
|
||||
109: 13(int) Load 95(i)
|
||||
110: 13(int) IAdd 109 34
|
||||
Store 95(i) 110
|
||||
Branch 96
|
||||
98: Label
|
||||
111: 7(fvec4) Load 89(r)
|
||||
112: 90(fvec3) VectorShuffle 111 111 0 1 2
|
||||
113: 7(fvec4) Load 37(gl_FragColor)
|
||||
114: 90(fvec3) VectorShuffle 113 113 0 1 2
|
||||
115: 90(fvec3) FAdd 114 112
|
||||
116: 7(fvec4) Load 37(gl_FragColor)
|
||||
117: 7(fvec4) VectorShuffle 116 115 4 5 6 3
|
||||
Store 37(gl_FragColor) 117
|
||||
Store 118(i) 16
|
||||
Branch 119
|
||||
119: Label
|
||||
LoopMerge 121 122 None
|
||||
Branch 123
|
||||
123: Label
|
||||
124: 13(int) Load 118(i)
|
||||
126: 26(bool) SLessThan 124 125
|
||||
BranchConditional 126 120 121
|
||||
120: Label
|
||||
127: 6(float) Load 105(f)
|
||||
128: 7(fvec4) Load 37(gl_FragColor)
|
||||
129: 7(fvec4) VectorTimesScalar 128 127
|
||||
Store 37(gl_FragColor) 129
|
||||
Branch 122
|
||||
122: Label
|
||||
130: 13(int) Load 118(i)
|
||||
131: 13(int) IAdd 130 49
|
||||
Store 118(i) 131
|
||||
Branch 119
|
||||
121: Label
|
||||
37: 7(fvec4) Load 9(color)
|
||||
Store 36(gl_FragColor) 37
|
||||
Store 39(sum) 40
|
||||
Store 41(i) 16
|
||||
Branch 42
|
||||
42: Label
|
||||
LoopMerge 44 45 None
|
||||
Branch 46
|
||||
46: Label
|
||||
47: 13(int) Load 41(i)
|
||||
49: 26(bool) SLessThan 47 48
|
||||
BranchConditional 49 43 44
|
||||
43: Label
|
||||
54: 13(int) Load 41(i)
|
||||
56: 55(ptr) AccessChain 53(v4) 54
|
||||
57: 50(int) Load 56
|
||||
58: 6(float) ConvertUToF 57
|
||||
59: 6(float) Load 39(sum)
|
||||
60: 6(float) FAdd 59 58
|
||||
Store 39(sum) 60
|
||||
Branch 45
|
||||
45: Label
|
||||
61: 13(int) Load 41(i)
|
||||
62: 13(int) IAdd 61 33
|
||||
Store 41(i) 62
|
||||
Branch 42
|
||||
44: Label
|
||||
Store 63(i) 16
|
||||
Branch 64
|
||||
64: Label
|
||||
LoopMerge 66 67 None
|
||||
Branch 68
|
||||
68: Label
|
||||
69: 13(int) Load 63(i)
|
||||
70: 26(bool) SLessThan 69 48
|
||||
BranchConditional 70 65 66
|
||||
65: Label
|
||||
72: 13(int) Load 63(i)
|
||||
73: 13(int) Load 63(i)
|
||||
74: 55(ptr) AccessChain 53(v4) 73
|
||||
75: 50(int) Load 74
|
||||
77: 50(int) IMul 75 76
|
||||
78: 6(float) ConvertUToF 77
|
||||
79: 38(ptr) AccessChain 71(tv4) 72
|
||||
Store 79 78
|
||||
Branch 67
|
||||
67: Label
|
||||
80: 13(int) Load 63(i)
|
||||
81: 13(int) IAdd 80 33
|
||||
Store 63(i) 81
|
||||
Branch 64
|
||||
66: Label
|
||||
82: 6(float) Load 39(sum)
|
||||
83: 7(fvec4) CompositeConstruct 82 82 82 82
|
||||
84: 7(fvec4) Load 71(tv4)
|
||||
85: 7(fvec4) FAdd 83 84
|
||||
86: 7(fvec4) Load 36(gl_FragColor)
|
||||
87: 7(fvec4) FAdd 86 85
|
||||
Store 36(gl_FragColor) 87
|
||||
90: 7(fvec4) Load 11(BaseColor)
|
||||
91: 89(fvec3) VectorShuffle 90 90 0 1 2
|
||||
92: 7(fvec4) Load 88(r)
|
||||
93: 7(fvec4) VectorShuffle 92 91 4 5 6 3
|
||||
Store 88(r) 93
|
||||
Store 94(i) 16
|
||||
Branch 95
|
||||
95: Label
|
||||
LoopMerge 97 98 None
|
||||
Branch 99
|
||||
99: Label
|
||||
100: 13(int) Load 94(i)
|
||||
101: 13(int) Load 24(Count)
|
||||
102: 26(bool) SLessThan 100 101
|
||||
BranchConditional 102 96 97
|
||||
96: Label
|
||||
105: 6(float) Load 104(f)
|
||||
107: 38(ptr) AccessChain 88(r) 106
|
||||
Store 107 105
|
||||
Branch 98
|
||||
98: Label
|
||||
108: 13(int) Load 94(i)
|
||||
109: 13(int) IAdd 108 33
|
||||
Store 94(i) 109
|
||||
Branch 95
|
||||
97: Label
|
||||
110: 7(fvec4) Load 88(r)
|
||||
111: 89(fvec3) VectorShuffle 110 110 0 1 2
|
||||
112: 7(fvec4) Load 36(gl_FragColor)
|
||||
113: 89(fvec3) VectorShuffle 112 112 0 1 2
|
||||
114: 89(fvec3) FAdd 113 111
|
||||
115: 7(fvec4) Load 36(gl_FragColor)
|
||||
116: 7(fvec4) VectorShuffle 115 114 4 5 6 3
|
||||
Store 36(gl_FragColor) 116
|
||||
Store 117(i) 16
|
||||
Branch 118
|
||||
118: Label
|
||||
LoopMerge 120 121 None
|
||||
Branch 122
|
||||
122: Label
|
||||
123: 13(int) Load 117(i)
|
||||
125: 26(bool) SLessThan 123 124
|
||||
BranchConditional 125 119 120
|
||||
119: Label
|
||||
126: 6(float) Load 104(f)
|
||||
127: 7(fvec4) Load 36(gl_FragColor)
|
||||
128: 7(fvec4) VectorTimesScalar 127 126
|
||||
Store 36(gl_FragColor) 128
|
||||
Branch 121
|
||||
121: Label
|
||||
129: 13(int) Load 117(i)
|
||||
130: 13(int) IAdd 129 48
|
||||
Store 117(i) 130
|
||||
Branch 118
|
||||
120: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user