llvm-project
9cd1e406 - [HLSL] Layout Initalizer list in Column order via index conversion (#166277)

Commit
48 days ago
[HLSL] Layout Initalizer list in Column order via index conversion (#166277) fixes #165663 The bug was that we were using the initalizer lists index to populate the matrix. This meant that [0..n] would coorelate to [0..n] indicies of the flattened matrix. Hence why we were seeing the Row-major order: [ 0 1 2 3 4 5 ]. To fix this we can simply converted these indicies to the Column-major order: [ 0 3 1 4 2 5 ]. The net effect of this is the layout of the matrix is now correct and we don't need to change the MatrixSubscriptExpr indexing scheme. --------- Co-authored-by: Deric C. <cheung.deric@gmail.com> Co-authored-by: Helena Kotas <hekotas@microsoft.com>
Author
Parents
Loading