Check for extensions in negative getinternalformat tests.
authorMika Isojärvi <misojarvi@google.com>
Mon, 6 Apr 2015 18:28:52 +0000 (11:28 -0700)
committerMika Isojärvi <misojarvi@google.com>
Mon, 6 Apr 2015 19:57:42 +0000 (12:57 -0700)
Check if GL_EXT_render_snorm exists before asssuming that GL_RG8_SNORM
is not renderable.

Bug: 20005726
Change-Id: I5cb65de9e2e90dd7653a1edc5f20c41dd0559b6d

android/cts/mnc/com.drawelements.deqp.gles31.xml
android/cts/mnc/gles31-master.txt
android/cts/mnc/src/gles31-test-issues.txt
modules/gles31/functional/es31fNegativeStateApiTests.cpp

index 3295d6f..ce0c595 100644 (file)
                                                        <Test name="get_renderbuffer_parameteriv">
                                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                        </Test>
+                                                       <Test name="get_internalformativ">
+                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                                       </Test>
                                                        <Test name="get_queryiv">
                                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                        </Test>
index a00e7c9..926e8a5 100644 (file)
@@ -15924,6 +15924,7 @@ dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_buffer_parame
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_buffer_parameteri64v
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_buffer_pointerv
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_renderbuffer_parameteriv
+dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_internalformativ
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_queryiv
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_query_objectuiv
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_synciv
index 811fbb1..728083f 100644 (file)
@@ -1,9 +1,6 @@
 # Bug 20013546
 dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage3d_invalid_buffer_target
 
-# Bug 20005726
-dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_internalformativ
-
 # Bug 19897810
 dEQP-GLES31.functional.copy_image.*srgb*renderbuffer
 
index 8f07c11..1fe9b6b 100644 (file)
@@ -24,6 +24,7 @@
 #include "es31fNegativeStateApiTests.hpp"
 
 #include "gluCallLogWrapper.hpp"
+#include "gluContextInfo.hpp"
 #include "gluShaderProgram.hpp"
 
 #include "glwDefs.hpp"
@@ -970,8 +971,13 @@ void get_internalformativ (NegativeTestContext& ctx)
        ctx.endSection();
 
        ctx.beginSection("GL_INVALID_ENUM is generated if internalformat is not color-, depth-, or stencil-renderable.");
-       ctx.glGetInternalformativ       (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
-       ctx.expectError                         (GL_INVALID_ENUM);
+
+       if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_render_snorm"))
+       {
+               ctx.glGetInternalformativ       (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
+               ctx.expectError                         (GL_INVALID_ENUM);
+       }
+
        ctx.glGetInternalformativ       (GL_RENDERBUFFER, GL_COMPRESSED_RGB8_ETC2, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
        ctx.expectError                         (GL_INVALID_ENUM);
        ctx.endSection();