Check EXT_sparse_texture in get_internalformativ tests.
authorMika Isojärvi <misojarvi@google.com>
Mon, 6 Apr 2015 19:11:55 +0000 (12:11 -0700)
committerMika Isojärvi <misojarvi@google.com>
Fri, 10 Apr 2015 00:56:46 +0000 (17:56 -0700)
Check extension GL_EXT_sparse_texture before assuming that
GL_TEXTURE_2D is invalid target.

Bug: 20005726
Change-Id: I200ddea79c42e1734cae6b4bea4f358bda863112

modules/gles31/functional/es31fNegativeStateApiTests.cpp

index cedbe0b..761259f 100644 (file)
@@ -987,8 +987,13 @@ void get_internalformativ (NegativeTestContext& ctx)
        ctx.expectError                         (GL_INVALID_ENUM);
        ctx.glGetInternalformativ       (GL_FRAMEBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
        ctx.expectError                         (GL_INVALID_ENUM);
-       ctx.glGetInternalformativ       (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
-       ctx.expectError                         (GL_INVALID_ENUM);
+
+       if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_sparse_texture"))
+       {
+               ctx.glGetInternalformativ       (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
+               ctx.expectError                         (GL_INVALID_ENUM);
+       }
+
        ctx.endSection();
 }