Commit a76766a4 by Jason Ekstrand

getBaseAlignment: Use the rowMajor argument for determining matrix strides

The argument version is passed in from above and struct handling ensures that row-majorness gets propagated correctly from one level to the next. If we just look at the type itself and it's embedded in a struct that's declared row-major, we may get the wrong stride.
parent 79b7046a
......@@ -987,7 +987,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
// rules 5 and 7
if (type.isMatrix()) {
// rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows
TType derefType(type, 0, type.getQualifier().layoutMatrix == ElmRowMajor);
TType derefType(type, 0, rowMajor);
alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor);
if (std140)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment