|
@@ -5617,9 +5617,9 @@ void TranslateCBAddressUserLegacy(Instruction *user, Value *handle,
|
|
|
Value *cCol = ConstantInt::get(idx->getType(), col);
|
|
|
idx = Builder.CreateUDiv(idx, cCol);
|
|
|
idx = Builder.CreateAdd(idx, legacyIdx);
|
|
|
- // Just return a row.
|
|
|
+ // Just return a row; 'col' is the number of columns in the row.
|
|
|
ldData = GenerateCBLoadLegacy(handle, idx, /*channelOffset*/ 0, EltTy,
|
|
|
- row, hlslOP, Builder);
|
|
|
+ col, hlslOP, Builder);
|
|
|
}
|
|
|
if (!resultType->isVectorTy()) {
|
|
|
ldData = Builder.CreateExtractElement(ldData, Builder.getInt32(0));
|