Implements GL_EXT_unpack_subimage and GL_NV_pack_subimage.
Pack/unpack subimages is core features of GLES3. Those 2 extensions expose
them to GLES2.
BUG=angleproject:512
Change-Id: I6834cf5d4a91bc3430c60dcec29c449826fd6d93
Reviewed-on: https://chromium-review.googlesource.com/299790
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Minmin Gong <mgong@microsoft.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index e5f331d..7aeb1e1 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1094,6 +1094,26 @@
}
}
return true;
+ case GL_PACK_ROW_LENGTH:
+ case GL_PACK_SKIP_ROWS:
+ case GL_PACK_SKIP_PIXELS:
+ if (!mExtensions.packSubimage)
+ {
+ return false;
+ }
+ *type = GL_INT;
+ *numParams = 1;
+ return true;
+ case GL_UNPACK_ROW_LENGTH:
+ case GL_UNPACK_SKIP_ROWS:
+ case GL_UNPACK_SKIP_PIXELS:
+ if (!mExtensions.unpackSubimage)
+ {
+ return false;
+ }
+ *type = GL_INT;
+ *numParams = 1;
+ return true;
case GL_MAX_VIEWPORT_DIMS:
{
*type = GL_INT;
@@ -1204,6 +1224,12 @@
case GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:
case GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:
case GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:
+ case GL_PACK_ROW_LENGTH:
+ case GL_PACK_SKIP_ROWS:
+ case GL_PACK_SKIP_PIXELS:
+ case GL_UNPACK_ROW_LENGTH:
+ case GL_UNPACK_SKIP_ROWS:
+ case GL_UNPACK_SKIP_PIXELS:
{
*type = GL_INT;
*numParams = 1;