Factor code between PixelUnpackState and PixelPackState
BUG=angleproject:1512
Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98
Reviewed-on: https://chromium-review.googlesource.com/390133
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index 782646f..b594965 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -487,7 +487,7 @@
const auto &unpack = context->getGLState().getUnpackState();
bool targetIs3D = target == GL_TEXTURE_3D || target == GL_TEXTURE_2D_ARRAY;
- auto endByteOrErr = formatInfo.computeUnpackEndByte(type, size, unpack, targetIs3D);
+ auto endByteOrErr = formatInfo.computePackUnpackEndByte(type, size, unpack, targetIs3D);
if (endByteOrErr.isError())
{
context->handleError(endByteOrErr.getError());