Ensure the 'slice' pixel unpack/pack alignment is only aligned based on the row stride.
TRAC #23837
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
diff --git a/src/libGLESv2/formatutils.cpp b/src/libGLESv2/formatutils.cpp
index ce10ab5..341c560 100644
--- a/src/libGLESv2/formatutils.cpp
+++ b/src/libGLESv2/formatutils.cpp
@@ -1478,7 +1478,7 @@
GLuint GetDepthPitch(GLint internalFormat, GLenum type, GLuint clientVersion, GLsizei width, GLsizei height, GLint alignment)
{
- return (GetBlockSize(internalFormat, type, clientVersion, width, height) + alignment - 1) & ~(alignment - 1);
+ return GetRowPitch(internalFormat, type, clientVersion, width, alignment) * height;
}
GLuint GetBlockSize(GLint internalFormat, GLenum type, GLuint clientVersion, GLsizei width, GLsizei height)