Skip to content

Commit 18f7a75

Browse files
committed
Fix Transpose argument on Matrix::Cast not being passed in
1 parent 3848117 commit 18f7a75

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tools/clang/lib/Headers/hlsl/dx/linalg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class Matrix {
205205
bool Transpose = false>
206206
Matrix<NewCompTy, M, N, NewUse, Scope> Cast() {
207207
Matrix<NewCompTy, M, N, NewUse, Scope> Result;
208-
__builtin_LinAlg_CopyConvertMatrix(Result.__handle, __handle, false);
208+
__builtin_LinAlg_CopyConvertMatrix(Result.__handle, __handle, Transpose);
209209
return Result;
210210
}
211211

tools/clang/test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ void main(uint ID : SV_GroupID)
3939
MatrixBTyInt MatBInt1 = MatA1.Cast<ComponentType::I32, MatrixUse::B>();
4040

4141
// CHECK: call %dx.types.LinAlgMatrixC4M4N4U1S1 @dx.op.linAlgCopyConvertMatrix.mC4M4N4U1S1.mC9M4N4U1S1(
42-
// CHECK-SAME: i32 -2147483635, %dx.types.LinAlgMatrixC9M4N4U1S1 %[[MATB1]], i1 false)
42+
// CHECK-SAME: i32 -2147483635, %dx.types.LinAlgMatrixC9M4N4U1S1 %[[MATB1]], i1 true)
4343
// CHECK-SAME: ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
4444
MatrixBTyInt MatBInt2;
45-
MatBInt2 = MatB1.Cast<ComponentType::I32, MatrixUse::B>();
45+
MatBInt2 = MatB1.Cast<ComponentType::I32, MatrixUse::B, true>();
4646

4747
// Matrix::Load from ByteAddressBuffer
4848
//

0 commit comments

Comments
 (0)