Fix #944: Convert argument type to match formal parameter type.

This commit is contained in:
John Kessenich 2018-05-04 11:43:03 -06:00
parent 25bef9300d
commit d3ed90be3a
5 changed files with 277 additions and 274 deletions

View file

@ -1,7 +1,7 @@
spv.debugInfo.frag
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 126
// Id's are bound by 124
Capability Shader
2: ExtInstImport "GLSL.std.450"
@ -85,11 +85,9 @@ void main()
Name 54 "ubuf"
MemberName 54(ubuf) 0 "s"
Name 56 ""
Name 57 "S"
MemberName 57(S) 0 "a"
Name 59 "param"
Name 69 "s2d"
Name 99 "i"
Name 57 "param"
Name 67 "s2d"
Name 97 "i"
Decorate 24(inv) Location 0
Decorate 52(outv) Location 0
MemberDecorate 53(S) 0 Offset 0
@ -97,9 +95,9 @@ void main()
Decorate 54(ubuf) Block
Decorate 56 DescriptorSet 3
Decorate 56 Binding 0
Decorate 69(s2d) Location 0
Decorate 69(s2d) DescriptorSet 3
Decorate 69(s2d) Binding 1
Decorate 67(s2d) Location 0
Decorate 67(s2d) DescriptorSet 3
Decorate 67(s2d) Binding 1
3: TypeVoid
4: TypeFunction 3
7: TypeInt 32 1
@ -126,120 +124,118 @@ void main()
54(ubuf): TypeStruct 53(S)
55: TypePointer Uniform 54(ubuf)
56: 55(ptr) Variable Uniform
57(S): TypeStruct 7(int)
58: TypePointer Function 57(S)
60: TypePointer Uniform 53(S)
66: TypeImage 10(float) 2D sampled format:Unknown
67: TypeSampledImage 66
68: TypePointer UniformConstant 67
69(s2d): 68(ptr) Variable UniformConstant
71: TypeVector 10(float) 2
72: 10(float) Constant 1056964608
73: 71(fvec2) ConstantComposite 72 72
77: TypePointer Uniform 7(int)
106: 7(int) Constant 10
111: 7(int) Constant 1
113: TypePointer Output 10(float)
116: 10(float) Constant 1092616192
58: TypePointer Uniform 53(S)
64: TypeImage 10(float) 2D sampled format:Unknown
65: TypeSampledImage 64
66: TypePointer UniformConstant 65
67(s2d): 66(ptr) Variable UniformConstant
69: TypeVector 10(float) 2
70: 10(float) Constant 1056964608
71: 69(fvec2) ConstantComposite 70 70
75: TypePointer Uniform 7(int)
104: 7(int) Constant 10
109: 7(int) Constant 1
111: TypePointer Output 10(float)
114: 10(float) Constant 1092616192
5(main): 3 Function None 4
6: Label
59(param): 58(ptr) Variable Function
99(i): 19(ptr) Variable Function
118: 16(ptr) Variable Function
57(param): 9(ptr) Variable Function
97(i): 19(ptr) Variable Function
116: 16(ptr) Variable Function
Line 1 30 0
61: 60(ptr) AccessChain 56 18
62: 53(S) Load 61
63: 7(int) CompositeExtract 62 0
64: 19(ptr) AccessChain 59(param) 18
Store 64 63
65: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 59(param)
Store 52(outv) 65
59: 58(ptr) AccessChain 56 18
60: 53(S) Load 59
61: 7(int) CompositeExtract 60 0
62: 19(ptr) AccessChain 57(param) 18
Store 62 61
63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
Store 52(outv) 63
Line 1 31 0
70: 67 Load 69(s2d)
74: 11(fvec4) ImageSampleImplicitLod 70 73
75: 11(fvec4) Load 52(outv)
76: 11(fvec4) FAdd 75 74
Store 52(outv) 76
68: 65 Load 67(s2d)
72: 11(fvec4) ImageSampleImplicitLod 68 71
73: 11(fvec4) Load 52(outv)
74: 11(fvec4) FAdd 73 72
Store 52(outv) 74
Line 1 33 0
78: 77(ptr) AccessChain 56 18 18
79: 7(int) Load 78
SelectionMerge 83 None
Switch 79 82
case 10: 80
case 20: 81
82: Label
Line 1 42 0
94: 11(fvec4) Load 52(outv)
95: 11(fvec4) CompositeConstruct 28 28 28 28
96: 11(fvec4) FSub 94 95
Store 52(outv) 96
Line 1 43 0
Branch 83
76: 75(ptr) AccessChain 56 18 18
77: 7(int) Load 76
SelectionMerge 81 None
Switch 77 80
case 10: 78
case 20: 79
80: Label
Line 1 42 0
92: 11(fvec4) Load 52(outv)
93: 11(fvec4) CompositeConstruct 28 28 28 28
94: 11(fvec4) FSub 92 93
Store 52(outv) 94
Line 1 43 0
Branch 81
78: Label
Line 1 35 0
84: 11(fvec4) Load 52(outv)
85: 11(fvec4) CompositeConstruct 28 28 28 28
86: 11(fvec4) FAdd 84 85
Store 52(outv) 86
82: 11(fvec4) Load 52(outv)
83: 11(fvec4) CompositeConstruct 28 28 28 28
84: 11(fvec4) FAdd 82 83
Store 52(outv) 84
Line 1 36 0
Branch 83
81: Label
Branch 81
79: Label
Line 1 38 0
88: 11(fvec4) Load 52(outv)
89: 11(fvec4) VectorTimesScalar 88 45
Store 52(outv) 89
86: 11(fvec4) Load 52(outv)
87: 11(fvec4) VectorTimesScalar 86 45
Store 52(outv) 87
Line 1 39 0
90: 11(fvec4) Load 52(outv)
91: 11(fvec4) CompositeConstruct 28 28 28 28
92: 11(fvec4) FAdd 90 91
Store 52(outv) 92
88: 11(fvec4) Load 52(outv)
89: 11(fvec4) CompositeConstruct 28 28 28 28
90: 11(fvec4) FAdd 88 89
Store 52(outv) 90
Line 1 40 0
Branch 83
83: Label
Branch 81
81: Label
Line 1 46 0
Store 99(i) 18
Branch 100
100: Label
LoopMerge 102 103 None
Branch 104
104: Label
105: 7(int) Load 99(i)
107: 37(bool) SLessThan 105 106
BranchConditional 107 101 102
101: Label
Line 1 47 0
108: 11(fvec4) Load 52(outv)
109: 11(fvec4) VectorTimesScalar 108 36
Store 52(outv) 109
Branch 103
103: Label
Line 1 46 0
110: 7(int) Load 99(i)
112: 7(int) IAdd 110 111
Store 99(i) 112
Branch 100
Store 97(i) 18
Branch 98
98: Label
LoopMerge 100 101 None
Branch 102
102: Label
103: 7(int) Load 97(i)
105: 37(bool) SLessThan 103 104
BranchConditional 105 99 100
99: Label
Line 1 47 0
106: 11(fvec4) Load 52(outv)
107: 11(fvec4) VectorTimesScalar 106 36
Store 52(outv) 107
Branch 101
101: Label
Line 1 46 0
108: 7(int) Load 97(i)
110: 7(int) IAdd 108 109
Store 97(i) 110
Branch 98
100: Label
Line 1 49 0
114: 113(ptr) AccessChain 52(outv) 32
115: 10(float) Load 114
117: 37(bool) FOrdLessThan 115 116
SelectionMerge 120 None
BranchConditional 117 119 123
119: Label
112: 111(ptr) AccessChain 52(outv) 32
113: 10(float) Load 112
115: 37(bool) FOrdLessThan 113 114
SelectionMerge 118 None
BranchConditional 115 117 121
117: Label
Line 1 50 0
121: 11(fvec4) Load 52(outv)
122: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 121
Store 52(outv) 122
Store 118 122
Branch 120
123: Label
119: 11(fvec4) Load 52(outv)
120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119
Store 52(outv) 120
Store 116 120
Branch 118
121: Label
Line 1 51 0
124: 11(fvec4) Load 52(outv)
125: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 124
Store 52(outv) 125
Store 118 125
Branch 120
120: Label
122: 11(fvec4) Load 52(outv)
123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122
Store 52(outv) 123
Store 116 123
Branch 118
118: Label
Return
FunctionEnd
14(foo(struct-S-i11;): 11(fvec4) Function None 12