@@ -65,7 +65,11 @@ namespace Slang
65
65
auto anyValueType = cast<IRAnyValueType>(tupleType->getOperand (2 ));
66
66
67
67
// Create a null value for `rttiObject` for now since it will not be used.
68
- IRInst* rttiObject = builder->getIntValue (builder->getIntType (), 0 );
68
+ auto uint2Type = builder->getVectorType (
69
+ builder->getUIntType (), builder->getIntValue (builder->getIntType (), 2 ));
70
+ IRInst* zero = builder->getIntValue (builder->getUIntType (), 0 );
71
+ IRInst* zeroVectorArgs[] = { zero, zero };
72
+ IRInst* rttiObject = builder->emitMakeVector (uint2Type, 2 , zeroVectorArgs);
69
73
70
74
// Pack the user provided value into `AnyValue`.
71
75
IRInst* packedValue = inst->getValue ();
@@ -78,8 +82,7 @@ namespace Slang
78
82
// a `uint2` value from `typeID` to stay consistent with the convention.
79
83
IRInst* vectorArgs[2 ] = {
80
84
inst->getTypeID (), builder->getIntValue (builder->getUIntType (), 0 )};
81
- auto uint2Type = builder->getVectorType (
82
- builder->getUIntType (), builder->getIntValue (builder->getIntType (), 2 ));
85
+
83
86
IRInst* typeIdValue = builder->emitMakeVector (uint2Type, 2 , vectorArgs);
84
87
typeIdValue = builder->emitBitCast (witnessTableIdType, typeIdValue);
85
88
IRInst* tupleArgs[] = {rttiObject, typeIdValue, packedValue};
0 commit comments