Re-land "Implements more pack/unpack states."
Pack: row length, skip rows, skip pixels.
Unpack: image height, skip images, skip rows, skip pixels.
Note that PBOs are not covered by this change.
Re-land with fix for test expectations.
BUG=angleproject:512
BUG=angleproject:1095
Change-Id: I71d8d3bd8fc1f2c75ca16ac2634d5eafcbd71f26
Reviewed-on: https://chromium-review.googlesource.com/305522
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index b9ea872..7ee2183 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1064,7 +1064,9 @@
GLenum sizedInternalFormat = GetSizedInternalFormat(format, type);
const InternalFormat &sizedFormatInfo = GetInternalFormatInfo(sizedInternalFormat);
- GLsizei outputPitch = sizedFormatInfo.computeRowPitch(type, width, context->getState().getPackAlignment(), 0);
+ GLsizei outputPitch =
+ sizedFormatInfo.computeRowPitch(type, width, context->getState().getPackAlignment(),
+ context->getState().getPackRowLength());
// sized query sanity check
if (bufSize)
{