Add validation and negative tests for multisample arrays
This adds errors for binding and allocating multisample array
textures. New tests in TextureMultisampleTest.cpp check that the
errors are generated as specified.
Tests for querying supported sample counts are also improved and
extended for multisample array textures.
BUG=angleproject:2775
TEST=angle_end2end_tests
Change-Id: I6a0fe7ae04bb3d0072f6cbe09026b05e2bc47325
Reviewed-on: https://chromium-review.googlesource.com/1188576
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index fb72f6c..895a910 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -3026,7 +3026,13 @@
return false;
}
break;
-
+ case TextureType::_2DMultisampleArray:
+ if (!context->getExtensions().textureMultisampleArray)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidEnum(), MultisampleArrayExtensionRequired);
+ return false;
+ }
+ break;
case TextureType::External:
if (!context->getExtensions().eglImageExternal &&
!context->getExtensions().eglStreamConsumerExternal)