Commit ad7645f4 by John Kessenich

Fix #1360: uint->int width conversions must still be typed as uint.

parent 14b85d3f
......@@ -190,7 +190,7 @@ protected:
glslang::TBasicType typeProxy);
spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand,
glslang::TBasicType typeProxy);
spv::Id createConversionOperation(glslang::TOperator op, spv::Id operand, int vectorSize);
spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize);
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
......@@ -4830,121 +4830,82 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat
return result;
}
spv::Id TGlslangToSpvTraverser::createConversionOperation(glslang::TOperator op, spv::Id operand, int vectorSize)
// For converting integers where both the bitwidth and the signedness could
// change, but only do the width change here. The caller is still responsible
// for the signedness conversion.
spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize)
{
spv::Op convOp = spv::OpNop;
spv::Id type = 0;
spv::Id result = 0;
// Get the result type width, based on the type to convert to.
int width = 32;
switch(op) {
case glslang::EOpConvInt16ToUint8:
case glslang::EOpConvIntToUint8:
case glslang::EOpConvInt64ToUint8:
case glslang::EOpConvUint16ToInt8:
case glslang::EOpConvUintToInt8:
case glslang::EOpConvUint64ToInt8:
width = 8;
break;
case glslang::EOpConvInt8ToUint16:
convOp = spv::OpSConvert;
type = builder.makeIntType(16);
case glslang::EOpConvIntToUint16:
case glslang::EOpConvInt64ToUint16:
case glslang::EOpConvUint8ToInt16:
case glslang::EOpConvUintToInt16:
case glslang::EOpConvUint64ToInt16:
width = 16;
break;
case glslang::EOpConvInt8ToUint:
convOp = spv::OpSConvert;
type = builder.makeIntType(32);
case glslang::EOpConvInt16ToUint:
case glslang::EOpConvInt64ToUint:
case glslang::EOpConvUint8ToInt:
case glslang::EOpConvUint16ToInt:
case glslang::EOpConvUint64ToInt:
width = 32;
break;
case glslang::EOpConvInt8ToUint64:
convOp = spv::OpSConvert;
type = builder.makeIntType(64);
case glslang::EOpConvInt16ToUint64:
case glslang::EOpConvIntToUint64:
case glslang::EOpConvUint8ToInt64:
case glslang::EOpConvUint16ToInt64:
case glslang::EOpConvUintToInt64:
width = 64;
break;
case glslang::EOpConvInt16ToUint8:
convOp = spv::OpSConvert;
type = builder.makeIntType(8);
default:
assert(false && "Default missing");
break;
}
// Get the conversion operation and result type,
// based on the target width, but the source type.
spv::Id type = spv::NoType;
spv::Op convOp = spv::OpNop;
switch(op) {
case glslang::EOpConvInt8ToUint16:
case glslang::EOpConvInt8ToUint:
case glslang::EOpConvInt8ToUint64:
case glslang::EOpConvInt16ToUint8:
case glslang::EOpConvInt16ToUint:
convOp = spv::OpSConvert;
type = builder.makeIntType(32);
break;
case glslang::EOpConvInt16ToUint64:
convOp = spv::OpSConvert;
type = builder.makeIntType(64);
break;
case glslang::EOpConvIntToUint8:
convOp = spv::OpSConvert;
type = builder.makeIntType(8);
break;
case glslang::EOpConvIntToUint16:
convOp = spv::OpSConvert;
type = builder.makeIntType(16);
break;
case glslang::EOpConvIntToUint64:
convOp = spv::OpSConvert;
type = builder.makeIntType(64);
break;
case glslang::EOpConvInt64ToUint8:
convOp = spv::OpSConvert;
type = builder.makeIntType(8);
break;
case glslang::EOpConvInt64ToUint16:
convOp = spv::OpSConvert;
type = builder.makeIntType(16);
break;
case glslang::EOpConvInt64ToUint:
convOp = spv::OpSConvert;
type = builder.makeIntType(32);
break;
case glslang::EOpConvUint8ToInt16:
convOp = spv::OpUConvert;
type = builder.makeIntType(16);
break;
case glslang::EOpConvUint8ToInt:
convOp = spv::OpUConvert;
type = builder.makeIntType(32);
break;
case glslang::EOpConvUint8ToInt64:
convOp = spv::OpUConvert;
type = builder.makeIntType(64);
break;
case glslang::EOpConvUint16ToInt8:
convOp = spv::OpUConvert;
type = builder.makeIntType(8);
break;
case glslang::EOpConvUint16ToInt:
convOp = spv::OpUConvert;
type = builder.makeIntType(32);
break;
case glslang::EOpConvUint16ToInt64:
convOp = spv::OpUConvert;
type = builder.makeIntType(64);
break;
case glslang::EOpConvUintToInt8:
convOp = spv::OpUConvert;
type = builder.makeIntType(8);
break;
case glslang::EOpConvUintToInt16:
convOp = spv::OpUConvert;
type = builder.makeIntType(16);
break;
case glslang::EOpConvUintToInt64:
convOp = spv::OpUConvert;
type = builder.makeIntType(64);
break;
case glslang::EOpConvUint64ToInt8:
convOp = spv::OpUConvert;
type = builder.makeIntType(8);
break;
case glslang::EOpConvUint64ToInt16:
convOp = spv::OpUConvert;
type = builder.makeIntType(16);
break;
case glslang::EOpConvUint64ToInt:
convOp = spv::OpUConvert;
type = builder.makeIntType(32);
type = builder.makeIntType(width);
break;
default:
assert(false && "Default missing");
convOp = spv::OpUConvert;
type = builder.makeUintType(width);
break;
}
if (vectorSize > 0)
type = builder.makeVectorType(type, vectorSize);
result = builder.createUnaryOp(convOp, type, operand);
return result;
return builder.createUnaryOp(convOp, type, operand);
}
spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecorations& decorations, spv::Id destType,
......@@ -5219,7 +5180,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
case glslang::EOpConvUint64ToInt16:
case glslang::EOpConvUint64ToInt:
// OpSConvert/OpUConvert + OpBitCast
operand = createConversionOperation(op, operand, vectorSize);
operand = createIntWidthConversion(op, operand, vectorSize);
if (builder.isInSpecConstCodeGenMode()) {
// Build zero scalar or vector for OpIAdd.
......
......@@ -143,8 +143,8 @@ spv.int16.amd.frag
205:198(i16vec2) ConstantComposite 203 203
211: TypeVector 28(int) 2
212: TypePointer Function 211(ivec2)
224: TypeVector 18(int) 2
225: TypePointer Function 224(ivec2)
222: TypeVector 18(int) 2
225: TypePointer Function 222(ivec2)
237: TypeFloat 32
238: TypeVector 237(float) 2
239: TypePointer Function 238(fvec2)
......@@ -157,9 +157,9 @@ spv.int16.amd.frag
273: TypeInt 64 1
274: TypeVector 273(int64_t) 2
275: TypePointer Function 274(i64vec2)
287: TypeInt 64 0
288: TypeVector 287(int64_t) 2
289: TypePointer Function 288(i64vec2)
285: TypeInt 64 0
286: TypeVector 285(int64_t) 2
289: TypePointer Function 286(i64vec2)
316: 17(int16_t) Constant 4294967295
317:187(i16vec2) ConstantComposite 316 316
326: 49(i16vec3) ConstantComposite 202 202 202
......@@ -175,7 +175,7 @@ spv.int16.amd.frag
407: TypePointer Function 261(float16_t)
431: TypePointer Function 273(int64_t)
434: TypeVector 17(int16_t) 4
440: TypePointer Function 287(int64_t)
440: TypePointer Function 285(int64_t)
443: TypeVector 14(int16_t) 4
449: TypePointer Function 388(bvec3)
515(Block): TypeStruct 54(i16vec3) 14(int16_t)
......@@ -186,7 +186,7 @@ spv.int16.amd.frag
520: TypePointer Input 17(int16_t)
521(ii16): 520(ptr) Variable Input
522(si64):273(int64_t) SpecConstant 4294967286 4294967295
523(su64):287(int64_t) SpecConstant 20 0
523(su64):285(int64_t) SpecConstant 20 0
524(si): 28(int) SpecConstant 4294967291
525(su): 18(int) SpecConstant 4
526(sb): 125(bool) SpecConstantTrue
......@@ -197,7 +197,7 @@ spv.int16.amd.frag
531: 17(int16_t) SpecConstantOp 169 526(sb) 53 194
532: 14(int16_t) SpecConstantOp 169 526(sb) 203 202
533: 28(int) SpecConstantOp 114 527(si16)
534: 28(int) SpecConstantOp 113 528(su16)
534: 18(int) SpecConstantOp 113 528(su16)
535: 28(int) SpecConstantOp 128 534 128
536: 17(int16_t) SpecConstantOp 114 524(si)
537: 17(int16_t) SpecConstantOp 114 524(si)
......@@ -205,20 +205,20 @@ spv.int16.amd.frag
539: 28(int) SpecConstantOp 114 527(si16)
540: 18(int) SpecConstantOp 128 539 128
541: 18(int) SpecConstantOp 113 528(su16)
542: 17(int16_t) SpecConstantOp 113 525(su)
542: 14(int16_t) SpecConstantOp 113 525(su)
543: 17(int16_t) SpecConstantOp 128 542 202
544: 14(int16_t) SpecConstantOp 113 525(su)
545:273(int64_t) SpecConstantOp 114 527(si16)
546:273(int64_t) SpecConstantOp 113 528(su16)
547:287(int64_t) Constant 0 0
546:285(int64_t) SpecConstantOp 113 528(su16)
547:285(int64_t) Constant 0 0
548:273(int64_t) SpecConstantOp 128 546 547
549: 17(int16_t) SpecConstantOp 114 522(si64)
550: 17(int16_t) SpecConstantOp 114 522(si64)
551: 14(int16_t) SpecConstantOp 128 550 202
552:273(int64_t) SpecConstantOp 114 527(si16)
553:287(int64_t) SpecConstantOp 128 552 547
554:287(int64_t) SpecConstantOp 113 528(su16)
555: 17(int16_t) SpecConstantOp 113 523(su64)
553:285(int64_t) SpecConstantOp 128 552 547
554:285(int64_t) SpecConstantOp 113 528(su16)
555: 14(int16_t) SpecConstantOp 113 523(su64)
556: 17(int16_t) SpecConstantOp 128 555 202
557: 14(int16_t) SpecConstantOp 113 523(su64)
558: 14(int16_t) SpecConstantOp 128 527(si16) 202
......@@ -450,22 +450,22 @@ spv.int16.amd.frag
220: 211(ivec2) SConvert 219
Store 213(iv) 220
221:198(i16vec2) Load 200(u16v)
222: 211(ivec2) UConvert 221
223: 211(ivec2) Bitcast 222
Store 213(iv) 223
227: 224(ivec2) Load 226(uv)
228:187(i16vec2) UConvert 227
223: 222(ivec2) UConvert 221
224: 211(ivec2) Bitcast 223
Store 213(iv) 224
227: 222(ivec2) Load 226(uv)
228:198(i16vec2) UConvert 227
229:187(i16vec2) Bitcast 228
Store 189(i16v) 229
230: 224(ivec2) Load 226(uv)
230: 222(ivec2) Load 226(uv)
231:198(i16vec2) UConvert 230
Store 200(u16v) 231
232:187(i16vec2) Load 189(i16v)
233: 211(ivec2) SConvert 232
234: 224(ivec2) Bitcast 233
234: 222(ivec2) Bitcast 233
Store 226(uv) 234
235:198(i16vec2) Load 200(u16v)
236: 224(ivec2) UConvert 235
236: 222(ivec2) UConvert 235
Store 226(uv) 236
241: 238(fvec2) Load 240(fv)
242:187(i16vec2) ConvertFToS 241
......@@ -514,22 +514,22 @@ spv.int16.amd.frag
283:274(i64vec2) SConvert 282
Store 276(i64v) 283
284:198(i16vec2) Load 200(u16v)
285:274(i64vec2) UConvert 284
286:274(i64vec2) Bitcast 285
Store 276(i64v) 286
291:288(i64vec2) Load 290(u64v)
292:187(i16vec2) UConvert 291
287:286(i64vec2) UConvert 284
288:274(i64vec2) Bitcast 287
Store 276(i64v) 288
291:286(i64vec2) Load 290(u64v)
292:198(i16vec2) UConvert 291
293:187(i16vec2) Bitcast 292
Store 189(i16v) 293
294:288(i64vec2) Load 290(u64v)
294:286(i64vec2) Load 290(u64v)
295:198(i16vec2) UConvert 294
Store 200(u16v) 295
296:187(i16vec2) Load 189(i16v)
297:274(i64vec2) SConvert 296
298:288(i64vec2) Bitcast 297
298:286(i64vec2) Bitcast 297
Store 290(u64v) 298
299:198(i16vec2) Load 200(u16v)
300:288(i64vec2) UConvert 299
300:286(i64vec2) UConvert 299
Store 290(u64v) 300
301:198(i16vec2) Load 200(u16v)
302:187(i16vec2) Bitcast 301
......@@ -696,9 +696,9 @@ spv.int16.amd.frag
Store 305(i16v) 439
442: 14(int16_t) Load 321(u16)
444:443(i16vec4) CompositeConstruct 442 442 442 442
445:287(int64_t) Bitcast 444
445:285(int64_t) Bitcast 444
Store 441(packu64) 445
446:287(int64_t) Load 441(packu64)
446:285(int64_t) Load 441(packu64)
447:443(i16vec4) Bitcast 446
448: 49(i16vec3) VectorShuffle 447 447 0 1 2
Store 319(u16v) 448
......
......@@ -128,8 +128,8 @@ spv.int16.frag
53: TypePointer Function 52(i16vec2)
57: TypeVector 36(int16_t) 2
58: TypePointer Function 57(i16vec2)
65: TypeVector 17(int) 2
66: TypePointer Function 65(ivec2)
61: TypeVector 17(int) 2
66: TypePointer Function 61(ivec2)
71: TypeInt 64 1
72: TypeVector 71(int64_t) 2
73: TypePointer Function 72(i64vec2)
......@@ -148,9 +148,9 @@ spv.int16.frag
151: TypeInt 8 1
152: TypeVector 151(int8_t) 2
153: TypePointer Function 152(i8vec2)
160: TypeInt 8 0
161: TypeVector 160(int8_t) 2
162: TypePointer Function 161(i8vec2)
158: TypeInt 8 0
159: TypeVector 158(int8_t) 2
162: TypePointer Function 159(i8vec2)
173: TypeBool
174: TypeVector 173(bool) 2
175: TypePointer Function 174(bvec2)
......@@ -235,15 +235,15 @@ spv.int16.frag
56: 49(ivec2) SConvert 55
Store 51(i32v) 56
60: 57(i16vec2) Load 59(u16v)
61: 49(ivec2) UConvert 60
62: 49(ivec2) Bitcast 61
Store 51(i32v) 62
63: 52(i16vec2) Load 54(i16v)
64: 57(i16vec2) Bitcast 63
Store 59(u16v) 64
62: 61(ivec2) UConvert 60
63: 49(ivec2) Bitcast 62
Store 51(i32v) 63
64: 52(i16vec2) Load 54(i16v)
65: 57(i16vec2) Bitcast 64
Store 59(u16v) 65
68: 52(i16vec2) Load 54(i16v)
69: 49(ivec2) SConvert 68
70: 65(ivec2) Bitcast 69
70: 61(ivec2) Bitcast 69
Store 67(u32v) 70
75: 52(i16vec2) Load 54(i16v)
76: 72(i64vec2) SConvert 75
......@@ -253,10 +253,10 @@ spv.int16.frag
83: 78(i64vec2) Bitcast 82
Store 80(u64v) 83
84: 57(i16vec2) Load 59(u16v)
85: 65(ivec2) UConvert 84
85: 61(ivec2) UConvert 84
Store 67(u32v) 85
86: 57(i16vec2) Load 59(u16v)
87: 72(i64vec2) UConvert 86
87: 78(i64vec2) UConvert 86
88: 72(i64vec2) Bitcast 87
Store 74(i64v) 88
89: 57(i16vec2) Load 59(u16v)
......@@ -284,7 +284,7 @@ spv.int16.frag
116: 49(ivec2) SConvert 115
Store 51(i32v) 116
117: 57(i16vec2) Load 59(u16v)
118: 49(ivec2) UConvert 117
118: 61(ivec2) UConvert 117
119: 49(ivec2) Bitcast 118
Store 51(i32v) 119
120: 52(i16vec2) Load 54(i16v)
......@@ -292,7 +292,7 @@ spv.int16.frag
Store 59(u16v) 121
122: 52(i16vec2) Load 54(i16v)
123: 49(ivec2) SConvert 122
124: 65(ivec2) Bitcast 123
124: 61(ivec2) Bitcast 123
Store 67(u32v) 124
125: 52(i16vec2) Load 54(i16v)
126: 72(i64vec2) SConvert 125
......@@ -302,14 +302,14 @@ spv.int16.frag
129: 78(i64vec2) Bitcast 128
Store 80(u64v) 129
130: 57(i16vec2) Load 59(u16v)
131: 65(ivec2) UConvert 130
131: 61(ivec2) UConvert 130
Store 67(u32v) 131
132: 57(i16vec2) Load 59(u16v)
133: 72(i64vec2) UConvert 132
133: 78(i64vec2) UConvert 132
134: 72(i64vec2) Bitcast 133
Store 74(i64v) 134
135: 57(i16vec2) Load 59(u16v)
136: 72(i64vec2) UConvert 135
136: 78(i64vec2) UConvert 135
137: 72(i64vec2) Bitcast 136
138: 78(i64vec2) Bitcast 137
Store 80(u64v) 138
......@@ -335,19 +335,19 @@ spv.int16.frag
156: 152(i8vec2) SConvert 155
Store 154(i8v) 156
157: 57(i16vec2) Load 59(u16v)
158: 152(i8vec2) UConvert 157
159: 152(i8vec2) Bitcast 158
Store 154(i8v) 159
160: 159(i8vec2) UConvert 157
161: 152(i8vec2) Bitcast 160
Store 154(i8v) 161
164: 52(i16vec2) Load 54(i16v)
165: 152(i8vec2) SConvert 164
166: 161(i8vec2) Bitcast 165
166: 159(i8vec2) Bitcast 165
Store 163(u8v) 166
167: 57(i16vec2) Load 59(u16v)
168: 161(i8vec2) UConvert 167
168: 159(i8vec2) UConvert 167
Store 163(u8v) 168
169: 57(i16vec2) Load 59(u16v)
170: 161(i8vec2) UConvert 169
171: 52(i16vec2) UConvert 170
170: 159(i8vec2) UConvert 169
171: 57(i16vec2) UConvert 170
172: 52(i16vec2) Bitcast 171
Store 54(i16v) 172
177: 174(bvec2) Load 176(bv)
......
......@@ -42,8 +42,8 @@ spv.int32.frag
Name 78 "f32v"
Name 84 "f64v"
Name 94 "i8v"
Name 103 "i16v"
Name 123 "u8v"
Name 105 "i16v"
Name 125 "u8v"
Name 132 "u16v"
Name 152 "f16v"
Name 168 "bv"
......@@ -144,15 +144,15 @@ spv.int32.frag
91: TypeInt 8 1
92: TypeVector 91(int8_t) 2
93: TypePointer Function 92(i8vec2)
100: TypeInt 16 1
101: TypeVector 100(int16_t) 2
102: TypePointer Function 101(i16vec2)
120: TypeInt 8 0
121: TypeVector 120(int8_t) 2
122: TypePointer Function 121(i8vec2)
129: TypeInt 16 0
130: TypeVector 129(int16_t) 2
131: TypePointer Function 130(i16vec2)
98: TypeInt 8 0
99: TypeVector 98(int8_t) 2
102: TypeInt 16 1
103: TypeVector 102(int16_t) 2
104: TypePointer Function 103(i16vec2)
109: TypeInt 16 0
110: TypeVector 109(int16_t) 2
124: TypePointer Function 99(i8vec2)
131: TypePointer Function 110(i16vec2)
149: TypeFloat 16
150: TypeVector 149(float16_t) 2
151: TypePointer Function 150(f16vec2)
......@@ -181,7 +181,7 @@ spv.int32.frag
395: 394(bvec3) ConstantComposite 381 381 381
397: TypeVector 91(int8_t) 4
398: TypePointer Function 397(i8vec4)
405: TypeVector 120(int8_t) 4
405: TypeVector 98(int8_t) 4
406: TypePointer Function 405(i8vec4)
417: TypePointer Function 63(int64_t)
421: TypePointer Function 394(bvec3)
......@@ -229,8 +229,8 @@ spv.int32.frag
78(f32v): 77(ptr) Variable Function
84(f64v): 83(ptr) Variable Function
94(i8v): 93(ptr) Variable Function
103(i16v): 102(ptr) Variable Function
123(u8v): 122(ptr) Variable Function
105(i16v): 104(ptr) Variable Function
125(u8v): 124(ptr) Variable Function
132(u16v): 131(ptr) Variable Function
152(f16v): 151(ptr) Variable Function
168(bv): 167(ptr) Variable Function
......@@ -245,7 +245,7 @@ spv.int32.frag
69: 64(i64vec2) Bitcast 68
Store 66(u64v) 69
70: 49(ivec2) Load 51(u32v)
71: 58(i64vec2) UConvert 70
71: 64(i64vec2) UConvert 70
72: 58(i64vec2) Bitcast 71
Store 60(i64v) 72
73: 49(ivec2) Load 51(u32v)
......@@ -267,44 +267,44 @@ spv.int32.frag
96: 92(i8vec2) SConvert 95
Store 94(i8v) 96
97: 49(ivec2) Load 51(u32v)
98: 92(i8vec2) UConvert 97
99: 92(i8vec2) Bitcast 98
Store 94(i8v) 99
104: 52(ivec2) Load 54(i32v)
105:101(i16vec2) SConvert 104
Store 103(i16v) 105
106: 49(ivec2) Load 51(u32v)
107:101(i16vec2) UConvert 106
108:101(i16vec2) Bitcast 107
Store 103(i16v) 108
109: 52(ivec2) Load 54(i32v)
110: 18(int) CompositeExtract 109 0
111: 18(int) CompositeExtract 109 1
112: 52(ivec2) CompositeConstruct 110 111
Store 54(i32v) 112
113: 49(ivec2) Load 51(u32v)
114: 52(ivec2) Bitcast 113
Store 54(i32v) 114
115: 52(ivec2) Load 54(i32v)
116: 58(i64vec2) SConvert 115
Store 60(i64v) 116
100: 99(i8vec2) UConvert 97
101: 92(i8vec2) Bitcast 100
Store 94(i8v) 101
106: 52(ivec2) Load 54(i32v)
107:103(i16vec2) SConvert 106
Store 105(i16v) 107
108: 49(ivec2) Load 51(u32v)
111:110(i16vec2) UConvert 108
112:103(i16vec2) Bitcast 111
Store 105(i16v) 112
113: 52(ivec2) Load 54(i32v)
114: 18(int) CompositeExtract 113 0
115: 18(int) CompositeExtract 113 1
116: 52(ivec2) CompositeConstruct 114 115
Store 54(i32v) 116
117: 49(ivec2) Load 51(u32v)
118: 58(i64vec2) UConvert 117
119: 58(i64vec2) Bitcast 118
Store 60(i64v) 119
124: 52(ivec2) Load 54(i32v)
125: 92(i8vec2) SConvert 124
126: 121(i8vec2) Bitcast 125
Store 123(u8v) 126
127: 49(ivec2) Load 51(u32v)
128: 121(i8vec2) UConvert 127
Store 123(u8v) 128
118: 52(ivec2) Bitcast 117
Store 54(i32v) 118
119: 52(ivec2) Load 54(i32v)
120: 58(i64vec2) SConvert 119
Store 60(i64v) 120
121: 49(ivec2) Load 51(u32v)
122: 64(i64vec2) UConvert 121
123: 58(i64vec2) Bitcast 122
Store 60(i64v) 123
126: 52(ivec2) Load 54(i32v)
127: 92(i8vec2) SConvert 126
128: 99(i8vec2) Bitcast 127
Store 125(u8v) 128
129: 49(ivec2) Load 51(u32v)
130: 99(i8vec2) UConvert 129
Store 125(u8v) 130
133: 52(ivec2) Load 54(i32v)
134:101(i16vec2) SConvert 133
135:130(i16vec2) Bitcast 134
134:103(i16vec2) SConvert 133
135:110(i16vec2) Bitcast 134
Store 132(u16v) 135
136: 49(ivec2) Load 51(u32v)
137:130(i16vec2) UConvert 136
137:110(i16vec2) UConvert 136
Store 132(u16v) 137
138: 52(ivec2) Load 54(i32v)
139: 49(ivec2) Bitcast 138
......@@ -519,7 +519,7 @@ spv.int32.frag
325(u32v): 185(ptr) Variable Function
327(u32): 38(ptr) Variable Function
399(i8v4): 398(ptr) Variable Function
402(i16v2): 102(ptr) Variable Function
402(i16v2): 104(ptr) Variable Function
407(u8v4): 406(ptr) Variable Function
410(u16v2): 131(ptr) Variable Function
413(i64): 226(ptr) Variable Function
......@@ -621,13 +621,13 @@ spv.int32.frag
400: 397(i8vec4) Load 399(i8v4)
401: 18(int) Bitcast 400
Store 315(i32) 401
403:101(i16vec2) Load 402(i16v2)
403:103(i16vec2) Load 402(i16v2)
404: 18(int) Bitcast 403
Store 315(i32) 404
408: 405(i8vec4) Load 407(u8v4)
409: 14(int) Bitcast 408
Store 327(u32) 409
411:130(i16vec2) Load 410(u16v2)
411:110(i16vec2) Load 410(u16v2)
412: 14(int) Bitcast 411
Store 327(u32) 412
414: 57(int64_t) Load 413(i64)
......
......@@ -167,13 +167,13 @@ spv.int64.frag
477: 14(int64_t) SpecConstantOp 113 468(su)
478: 18(int64_t) SpecConstantOp 128 466(su64) 69
479: 14(int64_t) SpecConstantOp 128 465(si64) 69
480: 31(int) SpecConstantOp 113 466(su64)
480: 21(int) SpecConstantOp 113 466(su64)
481: 31(int) SpecConstantOp 128 480 227
482: 18(int64_t) SpecConstantOp 114 467(si)
483: 14(int64_t) SpecConstantOp 128 482 69
484: 31(int) SpecConstantOp 114 465(si64)
485: 21(int) SpecConstantOp 128 484 227
486: 18(int64_t) SpecConstantOp 113 468(su)
486: 14(int64_t) SpecConstantOp 113 468(su)
487: 18(int64_t) SpecConstantOp 128 486 69
4(main): 2 Function None 3
5: Label
......@@ -268,11 +268,11 @@ spv.int64.frag
122: 81(ivec2) Bitcast 121
Store 83(uv) 122
123: 81(ivec2) Load 83(uv)
124: 52(i64vec2) UConvert 123
124: 65(i64vec2) UConvert 123
125: 52(i64vec2) Bitcast 124
Store 54(i64v) 125
126: 65(i64vec2) Load 67(u64v)
127: 74(ivec2) UConvert 126
127: 81(ivec2) UConvert 126
128: 74(ivec2) Bitcast 127
Store 76(iv) 128
129: 74(ivec2) Load 76(iv)
......
......@@ -125,8 +125,8 @@ spv.vulkan110.int16.frag
53: TypePointer Function 52(i16vec2)
57: TypeVector 36(int16_t) 2
58: TypePointer Function 57(i16vec2)
65: TypeVector 17(int) 2
66: TypePointer Function 65(ivec2)
61: TypeVector 17(int) 2
66: TypePointer Function 61(ivec2)
71: TypeInt 64 1
72: TypeVector 71(int64_t) 2
73: TypePointer Function 72(i64vec2)
......@@ -145,9 +145,9 @@ spv.vulkan110.int16.frag
151: TypeInt 8 1
152: TypeVector 151(int8_t) 2
153: TypePointer Function 152(i8vec2)
160: TypeInt 8 0
161: TypeVector 160(int8_t) 2
162: TypePointer Function 161(i8vec2)
158: TypeInt 8 0
159: TypeVector 158(int8_t) 2
162: TypePointer Function 159(i8vec2)
173: TypeBool
174: TypeVector 173(bool) 2
175: TypePointer Function 174(bvec2)
......@@ -232,15 +232,15 @@ spv.vulkan110.int16.frag
56: 49(ivec2) SConvert 55
Store 51(i32v) 56
60: 57(i16vec2) Load 59(u16v)
61: 49(ivec2) UConvert 60
62: 49(ivec2) Bitcast 61
Store 51(i32v) 62
63: 52(i16vec2) Load 54(i16v)
64: 57(i16vec2) Bitcast 63
Store 59(u16v) 64
62: 61(ivec2) UConvert 60
63: 49(ivec2) Bitcast 62
Store 51(i32v) 63
64: 52(i16vec2) Load 54(i16v)
65: 57(i16vec2) Bitcast 64
Store 59(u16v) 65
68: 52(i16vec2) Load 54(i16v)
69: 49(ivec2) SConvert 68
70: 65(ivec2) Bitcast 69
70: 61(ivec2) Bitcast 69
Store 67(u32v) 70
75: 52(i16vec2) Load 54(i16v)
76: 72(i64vec2) SConvert 75
......@@ -250,10 +250,10 @@ spv.vulkan110.int16.frag
83: 78(i64vec2) Bitcast 82
Store 80(u64v) 83
84: 57(i16vec2) Load 59(u16v)
85: 65(ivec2) UConvert 84
85: 61(ivec2) UConvert 84
Store 67(u32v) 85
86: 57(i16vec2) Load 59(u16v)
87: 72(i64vec2) UConvert 86
87: 78(i64vec2) UConvert 86
88: 72(i64vec2) Bitcast 87
Store 74(i64v) 88
89: 57(i16vec2) Load 59(u16v)
......@@ -281,7 +281,7 @@ spv.vulkan110.int16.frag
116: 49(ivec2) SConvert 115
Store 51(i32v) 116
117: 57(i16vec2) Load 59(u16v)
118: 49(ivec2) UConvert 117
118: 61(ivec2) UConvert 117
119: 49(ivec2) Bitcast 118
Store 51(i32v) 119
120: 52(i16vec2) Load 54(i16v)
......@@ -289,7 +289,7 @@ spv.vulkan110.int16.frag
Store 59(u16v) 121
122: 52(i16vec2) Load 54(i16v)
123: 49(ivec2) SConvert 122
124: 65(ivec2) Bitcast 123
124: 61(ivec2) Bitcast 123
Store 67(u32v) 124
125: 52(i16vec2) Load 54(i16v)
126: 72(i64vec2) SConvert 125
......@@ -299,14 +299,14 @@ spv.vulkan110.int16.frag
129: 78(i64vec2) Bitcast 128
Store 80(u64v) 129
130: 57(i16vec2) Load 59(u16v)
131: 65(ivec2) UConvert 130
131: 61(ivec2) UConvert 130
Store 67(u32v) 131
132: 57(i16vec2) Load 59(u16v)
133: 72(i64vec2) UConvert 132
133: 78(i64vec2) UConvert 132
134: 72(i64vec2) Bitcast 133
Store 74(i64v) 134
135: 57(i16vec2) Load 59(u16v)
136: 72(i64vec2) UConvert 135
136: 78(i64vec2) UConvert 135
137: 72(i64vec2) Bitcast 136
138: 78(i64vec2) Bitcast 137
Store 80(u64v) 138
......@@ -332,19 +332,19 @@ spv.vulkan110.int16.frag
156: 152(i8vec2) SConvert 155
Store 154(i8v) 156
157: 57(i16vec2) Load 59(u16v)
158: 152(i8vec2) UConvert 157
159: 152(i8vec2) Bitcast 158
Store 154(i8v) 159
160: 159(i8vec2) UConvert 157
161: 152(i8vec2) Bitcast 160
Store 154(i8v) 161
164: 52(i16vec2) Load 54(i16v)
165: 152(i8vec2) SConvert 164
166: 161(i8vec2) Bitcast 165
166: 159(i8vec2) Bitcast 165
Store 163(u8v) 166
167: 57(i16vec2) Load 59(u16v)
168: 161(i8vec2) UConvert 167
168: 159(i8vec2) UConvert 167
Store 163(u8v) 168
169: 57(i16vec2) Load 59(u16v)
170: 161(i8vec2) UConvert 169
171: 52(i16vec2) UConvert 170
170: 159(i8vec2) UConvert 169
171: 57(i16vec2) UConvert 170
172: 52(i16vec2) Bitcast 171
Store 54(i16v) 172
177: 174(bvec2) Load 176(bv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment