Use safe glFramebufferTexture* function
authorjames.glanville <james.glanville@imgtec.com>
Wed, 16 Aug 2017 10:50:19 +0000 (11:50 +0100)
committerjames.glanville <james.glanville@imgtec.com>
Wed, 16 Aug 2017 10:50:19 +0000 (11:50 +0100)
glFramebufferTexture() is only supported when GL_EXT_geometry_shader is
present. Use glFramebufferTextureLayer() instead so that testing is
possible on unextended ES3.1 contexts.

Components: AOSP

Affects:
dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.framebuffer_texture_level

modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp

index 9d77831..39a08d5 100644 (file)
@@ -1236,7 +1236,7 @@ TextureLevelTestCase::IterateResult TextureLevelTestCase::iterate (void)
                const tcu::ScopedLogSection section                     (m_testCtx.getLog(), name.str(), desc.str());
                tcu::TextureLevel                       reference               = genReferenceTexture(level, levelColors, uniformColor);
 
-               m_gl.framebufferTexture(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, m_texColorBuffer, level);
+               m_gl.framebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, m_texColorBuffer, level, 0);
 
                genUniformColor(uniformColor);
                render();