Fix incorrect NPOT availability check.
Add tests for enabling NPOT extensions.
BUG=angleproject:1678
Change-Id: Ibcbfc1192bceb634deb2904dbb9644902471e3fd
Reviewed-on: https://chromium-review.googlesource.com/425713
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index c9b559f..14d1036 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1535,7 +1535,7 @@
// TexSubImage parameters can be NPOT without textureNPOT extension,
// as long as the destination texture is POT.
bool hasNPOTSupport =
- context->getExtensions().textureNPOT && context->getClientVersion() >= Version(3, 0);
+ context->getExtensions().textureNPOT || context->getClientVersion() >= Version(3, 0);
if (!isSubImage && !hasNPOTSupport &&
(level != 0 && (!gl::isPow2(width) || !gl::isPow2(height) || !gl::isPow2(depth))))
{