Fix uninitialized fields in rsElement for composite data types
Bug: http://b/24142721
mBits and mBitsUnpadded are used to compute the size of an element. The
Element::compute was not initializing them properly for composite data
types, and thus returning zero as the size for a composite type within a
composite type.
Change-Id: I86240657c60b2007020ff3852c7d136d20a9ca89
diff --git a/rsElement.cpp b/rsElement.cpp
index 4d831ac..7d009ca 100644
--- a/rsElement.cpp
+++ b/rsElement.cpp
@@ -222,6 +222,8 @@
ctNoPadding ++;
}
+ mBits = bits;
+ mBitsUnpadded = bitsUnpadded;
mHal.state.elementSizeBytes = getSizeBytes();
}