From 8acdc205af7e417ece2f31526bb209309871340d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jarkko=20P=C3=B6yry?= Date: Wed, 8 Jul 2015 15:59:09 -0700 Subject: [PATCH] Check EXT_render_snorm and EXT_sparse_texture in gles3 negative tests. Bug: 20005726 Change-Id: Ie0dcaa65cc535d66070459efade758e4e9efbd67 --- modules/gles3/functional/es3fNegativeStateApiTests.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/gles3/functional/es3fNegativeStateApiTests.cpp b/modules/gles3/functional/es3fNegativeStateApiTests.cpp index 4254507..78556e6 100644 --- a/modules/gles3/functional/es3fNegativeStateApiTests.cpp +++ b/modules/gles3/functional/es3fNegativeStateApiTests.cpp @@ -24,6 +24,7 @@ #include "es3fNegativeStateApiTests.hpp" #include "es3fApiCase.hpp" #include "gluShaderProgram.hpp" +#include "gluContextInfo.hpp" #include "deMemory.h" #include "glwDefs.hpp" @@ -945,8 +946,12 @@ void NegativeStateApiTests::init (void) m_log << TestLog::EndSection; m_log << TestLog::Section("", "GL_INVALID_ENUM is generated if internalformat is not color-, depth-, or stencil-renderable."); - glGetInternalformativ (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); - expectError (GL_INVALID_ENUM); + if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) + { + glGetInternalformativ (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); + expectError (GL_INVALID_ENUM); + } + glGetInternalformativ (GL_RENDERBUFFER, GL_COMPRESSED_RGB8_ETC2, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); expectError (GL_INVALID_ENUM); m_log << TestLog::EndSection; @@ -956,8 +961,12 @@ void NegativeStateApiTests::init (void) expectError (GL_INVALID_ENUM); glGetInternalformativ (GL_FRAMEBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); expectError (GL_INVALID_ENUM); - glGetInternalformativ (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); - expectError (GL_INVALID_ENUM); + + if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_sparse_texture")) + { + glGetInternalformativ (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[0]); + expectError (GL_INVALID_ENUM); + } m_log << TestLog::EndSection; }); -- 2.7.4