@@ -333,8 +333,8 @@ struct SwizzledLValueInfo : ExtendedValueInfo
333
333
// The base expression (this should be an l-value)
334
334
LoweredValInfo base;
335
335
336
- // THe indices for the elements being swizzled
337
- ShortList<UInt , 4> elementIndices;
336
+ // The indices for the elements being swizzled
337
+ ShortList<uint32_t , 4> elementIndices;
338
338
};
339
339
340
340
// Represents the result of a matrix swizzle operation in an l-value context.
@@ -5495,7 +5495,7 @@ struct LValueExprLoweringVisitor : ExprLoweringVisitorBase<LValueExprLoweringVis
5495
5495
RefPtr<SwizzledLValueInfo> swizzledLValue = new SwizzledLValueInfo;
5496
5496
swizzledLValue->type = irType;
5497
5497
swizzledLValue->base = baseSwizzleInfo->base;
5498
- swizzledLValue->elementIndices = elementCount;
5498
+ swizzledLValue->elementIndices.add((uint32_t) elementCount) ;
5499
5499
5500
5500
// Take the swizzle element of the "outer" swizzle, as it was
5501
5501
// written by the user. In our running example of `foo[i].zw.y`
@@ -7146,7 +7146,7 @@ void assign(IRGenContext* context, LoweredValInfo const& inLeft, LoweredValInfo
7146
7146
// If there's a single element, just emit a regular store, otherwise
7147
7147
// proceed with a swizzle store
7148
7148
auto swizzledStore =
7149
- [builder](IRInst* dest, IRInst* source, UInt elementCount, UInt const* elementIndices)
7149
+ [builder](IRInst* dest, IRInst* source, UInt elementCount, uint32_t const* elementIndices)
7150
7150
{
7151
7151
if (elementCount == 1)
7152
7152
{
@@ -7272,14 +7272,14 @@ void assign(IRGenContext* context, LoweredValInfo const& inLeft, LoweredValInfo
7272
7272
// The number of element writes in each row
7273
7273
UInt rowSizes[maxRowIndex] = {};
7274
7274
// The columns being written to in each row
7275
- UInt rowWrites[maxRowIndex][maxCols];
7275
+ uint32_t rowWrites[maxRowIndex][maxCols];
7276
7276
// The RHS element indices being written in each row
7277
7277
UInt rowIndices[maxRowIndex][maxCols];
7278
7278
for (UInt i = 0; i < swizzleInfo->elementCount; ++i)
7279
7279
{
7280
7280
const auto& c = swizzleInfo->elementCoords[i];
7281
7281
auto& rowSize = rowSizes[c.row];
7282
- rowWrites[c.row][rowSize] = c.col;
7282
+ rowWrites[c.row][rowSize] = (uint32_t) c.col;
7283
7283
rowIndices[c.row][rowSize] = i;
7284
7284
++rowSize;
7285
7285
}
0 commit comments