From 10be6b2179e01f08cc682d7c94ee971b9dd0c446 Mon Sep 17 00:00:00 2001 From: Piotr Byszewski Date: Thu, 1 Feb 2018 13:08:10 +0100 Subject: [PATCH] Fix texturecubelod test This patch fixes issue with validation of texturecubelod test result. Issue happened when test was executed on ES3 capable hardware. Components: OpenGL VK-GL-CTS issue: 280 Affects: dEQP-GLES2.functional.shaders.texture_functions.vertex.* Change-Id: I92d81ca93cb84785ea806155d0436f167c4fbf31 --- modules/gles2/functional/es2fShaderTextureFunctionTests.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/gles2/functional/es2fShaderTextureFunctionTests.cpp b/modules/gles2/functional/es2fShaderTextureFunctionTests.cpp index 0a8c634..6f283cc 100644 --- a/modules/gles2/functional/es2fShaderTextureFunctionTests.cpp +++ b/modules/gles2/functional/es2fShaderTextureFunctionTests.cpp @@ -568,12 +568,20 @@ static void createCaseGroup (TestCaseGroup* parent, const char* groupName, const void ShaderTextureFunctionTests::init (void) { + const glw::Functions& gl = m_context.getRenderContext().getFunctions(); + // Samplers static const tcu::Sampler samplerLinearNoMipmap (tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, tcu::Sampler::LINEAR, tcu::Sampler::LINEAR); - static const tcu::Sampler samplerLinearMipmap (tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, + static tcu::Sampler samplerLinearMipmap (tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL, tcu::Sampler::LINEAR_MIPMAP_NEAREST, tcu::Sampler::LINEAR); + // GL_MAJOR_VERSION query does not exist on GLES2 + // so succeeding query implies GLES3+ hardware. + glw::GLint majorVersion = 0; + gl.getIntegerv(GL_MAJOR_VERSION, &majorVersion); + samplerLinearMipmap.seamlessCubeMap = (gl.getError() == GL_NO_ERROR); + // Default textures. // Type Format DataType W H L Sampler static const TextureSpec tex2D (TEXTURETYPE_2D, GL_RGBA, GL_UNSIGNED_BYTE, 256, 256, 1, samplerLinearNoMipmap); -- 2.7.4