Commit 77456f28 by Jamie Madill

Allow block encoders to work with a NULL pointer for the output list structure.

TRAC #23748 Signed-off-by: Nicolas Capens Signed-off-by: Geoff Lang
parent a6da33a1
...@@ -51,7 +51,11 @@ void BlockLayoutEncoder::encodeInterfaceBlockField(const InterfaceBlockField &fi ...@@ -51,7 +51,11 @@ void BlockLayoutEncoder::encodeInterfaceBlockField(const InterfaceBlockField &fi
getBlockLayoutInfo(field.type, field.arraySize, field.isRowMajorMatrix, &arrayStride, &matrixStride); getBlockLayoutInfo(field.type, field.arraySize, field.isRowMajorMatrix, &arrayStride, &matrixStride);
const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, field.isRowMajorMatrix); const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, field.isRowMajorMatrix);
mBlockInfoOut->push_back(memberInfo);
if (mBlockInfoOut)
{
mBlockInfoOut->push_back(memberInfo);
}
advanceOffset(field.type, field.arraySize, field.isRowMajorMatrix, arrayStride, matrixStride); advanceOffset(field.type, field.arraySize, field.isRowMajorMatrix, arrayStride, matrixStride);
} }
...@@ -64,7 +68,11 @@ void BlockLayoutEncoder::encodeType(GLenum type, unsigned int arraySize, bool is ...@@ -64,7 +68,11 @@ void BlockLayoutEncoder::encodeType(GLenum type, unsigned int arraySize, bool is
getBlockLayoutInfo(type, arraySize, isRowMajorMatrix, &arrayStride, &matrixStride); getBlockLayoutInfo(type, arraySize, isRowMajorMatrix, &arrayStride, &matrixStride);
const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, isRowMajorMatrix); const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, isRowMajorMatrix);
mBlockInfoOut->push_back(memberInfo);
if (mBlockInfoOut)
{
mBlockInfoOut->push_back(memberInfo);
}
advanceOffset(type, arraySize, isRowMajorMatrix, arrayStride, matrixStride); advanceOffset(type, arraySize, isRowMajorMatrix, arrayStride, matrixStride);
} }
......
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