From: Mika Isojärvi Date: Mon, 23 Feb 2015 18:34:38 +0000 (-0800) Subject: Check existence of GL_EXT_render_snorm in negative tests. X-Git-Tag: upstream/0.1.0~1943^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=531a9f5311e314348ebc7678984c852be8dd2a2b;p=platform%2Fupstream%2FVK-GL-CTS.git Check existence of GL_EXT_render_snorm in negative tests. Check if extension GL_EXT_render_snorm exists before assuming that setting renderbuffer storage to signed normalized format fails. Bug: 19462857 Change-Id: I0d0b14ecd0cc7952dbf163c67ed8c1bdb83f2d08 --- diff --git a/modules/gles3/functional/es3fNegativeBufferApiTests.cpp b/modules/gles3/functional/es3fNegativeBufferApiTests.cpp index 7fdad38..f722015 100644 --- a/modules/gles3/functional/es3fNegativeBufferApiTests.cpp +++ b/modules/gles3/functional/es3fNegativeBufferApiTests.cpp @@ -1059,8 +1059,12 @@ void NegativeBufferApiTests::init (void) expectError (GL_INVALID_ENUM); } - glRenderbufferStorage (GL_RENDERBUFFER, GL_RGBA8_SNORM, 1, 1); - expectError (GL_INVALID_ENUM); + if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) // GL_EXT_render_snorm disables error + { + glRenderbufferStorage (GL_RENDERBUFFER, GL_RGBA8_SNORM, 1, 1); + expectError (GL_INVALID_ENUM); + } + m_log << TestLog::EndSection; m_log << TestLog::Section("", "GL_INVALID_VALUE is generated if width or height is less than zero."); @@ -1392,8 +1396,12 @@ void NegativeBufferApiTests::init (void) expectError (GL_INVALID_ENUM); } - glRenderbufferStorageMultisample (GL_RENDERBUFFER, 2, GL_RGBA8_SNORM, 1, 1); - expectError (GL_INVALID_ENUM); + if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) // GL_EXT_render_snorm disables error + { + glRenderbufferStorageMultisample (GL_RENDERBUFFER, 2, GL_RGBA8_SNORM, 1, 1); + expectError (GL_INVALID_ENUM); + } + m_log << TestLog::EndSection; m_log << TestLog::Section("", "GL_INVALID_VALUE is generated if width or height is less than zero."); diff --git a/modules/gles31/functional/es31fNegativeBufferApiTests.cpp b/modules/gles31/functional/es31fNegativeBufferApiTests.cpp index 9f63623..7d14c91 100644 --- a/modules/gles31/functional/es31fNegativeBufferApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeBufferApiTests.cpp @@ -1084,8 +1084,12 @@ void renderbuffer_storage (NegativeTestContext& ctx) ctx.expectError (GL_INVALID_ENUM); } - ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_RGBA8_SNORM, 1, 1); - ctx.expectError (GL_INVALID_ENUM); + if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) // GL_EXT_render_snorm disables error + { + ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_RGBA8_SNORM, 1, 1); + ctx.expectError (GL_INVALID_ENUM); + } + ctx.endSection(); ctx.beginSection("GL_INVALID_VALUE is generated if width or height is less than zero."); @@ -1426,8 +1430,12 @@ void renderbuffer_storage_multisample (NegativeTestContext& ctx) ctx.expectError (GL_INVALID_ENUM); } - ctx.glRenderbufferStorageMultisample (GL_RENDERBUFFER, 2, GL_RGBA8_SNORM, 1, 1); - ctx.expectError (GL_INVALID_ENUM); + if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) // GL_EXT_render_snorm disables error + { + ctx.glRenderbufferStorageMultisample (GL_RENDERBUFFER, 2, GL_RGBA8_SNORM, 1, 1); + ctx.expectError (GL_INVALID_ENUM); + } + ctx.endSection(); ctx.beginSection("GL_INVALID_OPERATION is generated if samples is greater than the maximum number of samples supported for internalformat. (Unsigned integer format)");