Support GL 4.5 context in the precision and draw tests
authorAlexander Galazin <alexander.galazin@arm.com>
Mon, 14 Dec 2020 11:51:26 +0000 (12:51 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 29 Dec 2020 10:25:26 +0000 (10:25 +0000)
Affects:
dEQP-GLES3*.functional.shaders.builtin_functions.precision.*
dEQP-GLES3*.functional.draw_base_vertex.*

Components: AOSP

Change-Id: I8539b5b31bdbf206d89ef3dc1f74917f655a266b

modules/glshared/glsBuiltinPrecisionTests.cpp
modules/glshared/glsDrawTest.cpp

index a46fc04..a1a9962 100644 (file)
@@ -5063,7 +5063,8 @@ IterateResult FuncCaseBase::iterate (void)
 {
        MovePtr<ContextInfo>    info    (ContextInfo::create(getRenderContext()));
 
-       if (!m_extension.empty() && !info->isExtensionSupported(m_extension.c_str()))
+       if (!m_extension.empty() && !info->isExtensionSupported(m_extension.c_str()) &&
+               !glu::contextSupports(getRenderContext().getType(), glu::ApiType::core(4, 5)))
                throw NotSupportedError("Unsupported extension: " + m_extension);
 
        runTest();
index b8cff9c..a026d49 100644 (file)
@@ -3162,8 +3162,9 @@ DrawTest::IterateResult DrawTest::iterate (void)
                spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX ||
                spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX)
        {
-               const bool supportsES32 = contextSupports(m_renderCtx.getType(), glu::ApiType::es(3, 2));
-               TCU_CHECK_AND_THROW(NotSupportedError, supportsES32 || m_contextInfo->isExtensionSupported("GL_EXT_draw_elements_base_vertex"), "GL_EXT_draw_elements_base_vertex is not supported.");
+               const bool supportsES32orGL45 = contextSupports(m_renderCtx.getType(), glu::ApiType::es(3, 2)) ||
+                                                                               contextSupports(m_renderCtx.getType(), glu::ApiType::core(4, 5));
+               TCU_CHECK_AND_THROW(NotSupportedError, supportsES32orGL45 || m_contextInfo->isExtensionSupported("GL_EXT_draw_elements_base_vertex"), "GL_EXT_draw_elements_base_vertex is not supported.");
        }
 
        const bool                                      drawStep                = (m_iteration % 2) == 0;