Query MAX_DRAW_BUFFERS if NV_draw_buffers is supported
authorAlexander Galazin <alexander.galazin@arm.com>
Wed, 19 Jul 2017 08:58:54 +0000 (10:58 +0200)
committerAlexander Galazin <alexander.galazin@arm.com>
Wed, 19 Jul 2017 09:04:46 +0000 (11:04 +0200)
MAX_DRAW_BUFFERS can be queried when
GL_NV_draw_buffers/GL_EXT_draw_buffers is exposed.

Components: AOSP

Affects: dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers*

Change-Id: I552ea98c8b6f1db1706858bebac6db1aa3c2640f

modules/gles2/functional/es2fShaderBuiltinVarTests.cpp

index 9d48e49..4299491 100644 (file)
@@ -86,7 +86,8 @@ int ShaderBuiltinConstantCase::getRefValue (void)
 {
        if (m_varName == "gl_MaxDrawBuffers")
        {
-               if (m_ctxInfo.isExtensionSupported("GL_EXT_draw_buffers"))
+               if (m_ctxInfo.isExtensionSupported("GL_EXT_draw_buffers") ||
+                       m_ctxInfo.isExtensionSupported("GL_NV_draw_buffers"))
                        return m_ctxInfo.getInt(GL_MAX_DRAW_BUFFERS);
                else
                        return 1;