From a5387bed615e83cb1770067dbdd7cde0e50ae006 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Mon, 6 Apr 2015 12:11:55 -0700 Subject: [PATCH] Check EXT_sparse_texture in get_internalformativ tests. 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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/gles31/functional/es31fNegativeStateApiTests.cpp b/modules/gles31/functional/es31fNegativeStateApiTests.cpp index cedbe0b..761259f 100644 --- a/modules/gles31/functional/es31fNegativeStateApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeStateApiTests.cpp @@ -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, ¶ms[0]); ctx.expectError (GL_INVALID_ENUM); - ctx.glGetInternalformativ (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, ¶ms[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, ¶ms[0]); + ctx.expectError (GL_INVALID_ENUM); + } + ctx.endSection(); } -- 2.7.4