From: Alexander Galazin Date: Mon, 14 Dec 2020 12:37:20 +0000 (+0100) Subject: Support GL 4.5 in the texture test utils X-Git-Tag: upstream/1.3.5~1070 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44411bea24ae14bdbcb470f9f544534fd16a76ad;p=platform%2Fupstream%2FVK-GL-CTS.git Support GL 4.5 in the texture test utils Components: AOSP Affects: dEQP-GLES3*.functional.* Change-Id: I7c22694d829a4aa982e2def4b0be1290f86293bb --- diff --git a/modules/glshared/glsTextureStateQueryTests.cpp b/modules/glshared/glsTextureStateQueryTests.cpp index d4b166b..6ac62ad 100644 --- a/modules/glshared/glsTextureStateQueryTests.cpp +++ b/modules/glshared/glsTextureStateQueryTests.cpp @@ -547,9 +547,60 @@ static RequiredExtensions getTesterExtension (TesterType tester) } // es32 +namespace gl45 +{ + +static bool isCoreTextureTarget (glw::GLenum target) +{ + return es31::isCoreTextureTarget(target); +} + +static RequiredExtensions getTextureTargetExtension (glw::GLenum target) +{ + DE_UNREF(target); + return RequiredExtensions(); +} + +static bool isCoreTextureParam (glw::GLenum pname) +{ + return es31::isCoreTextureParam(pname); +} + +static RequiredExtensions getTextureParamExtension (glw::GLenum pname) +{ + DE_UNREF(pname); + return RequiredExtensions(); +} + +static bool isCoreQuery (QueryType query) +{ + return es31::isCoreQuery(query); +} + +static RequiredExtensions getQueryExtension (QueryType query) +{ + DE_UNREF(query); + return RequiredExtensions(); +} + +static bool isCoreTester (TesterType tester) +{ + return es31::isCoreTester(tester); +} + +static RequiredExtensions getTesterExtension (TesterType tester) +{ + DE_UNREF(tester); + return RequiredExtensions(); +} + +} // gl45 + static bool isCoreTextureTarget (const glu::ContextType& contextType, glw::GLenum target) { - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::isCoreTextureTarget(target); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::isCoreTextureTarget(target); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::isCoreTextureTarget(target); @@ -564,7 +615,9 @@ static bool isCoreTextureTarget (const glu::ContextType& contextType, glw::GLenu static bool isCoreTextureParam (const glu::ContextType& contextType, glw::GLenum pname) { - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::isCoreTextureParam(pname); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::isCoreTextureParam(pname); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::isCoreTextureParam(pname); @@ -579,7 +632,9 @@ static bool isCoreTextureParam (const glu::ContextType& contextType, glw::GLenum static bool isCoreQuery (const glu::ContextType& contextType, QueryType query) { - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::isCoreQuery(query); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::isCoreQuery(query); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::isCoreQuery(query); @@ -594,7 +649,9 @@ static bool isCoreQuery (const glu::ContextType& contextType, QueryType query) static bool isCoreTester (const glu::ContextType& contextType, TesterType tester) { - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::isCoreTester(tester); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::isCoreTester(tester); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::isCoreTester(tester); @@ -611,9 +668,11 @@ static RequiredExtensions getTextureTargetExtension (const glu::ContextType& con { DE_ASSERT(!isCoreTextureTarget(contextType, target)); - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::getTextureTargetExtension(target); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::getTextureTargetExtension(target); - if (contextSupports(contextType, glu::ApiType::es(3,1))) + else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::getTextureTargetExtension(target); else if (contextSupports(contextType, glu::ApiType::es(3,0))) return es30::getTextureTargetExtension(target); @@ -628,7 +687,9 @@ static RequiredExtensions getTextureParamExtension (const glu::ContextType& cont { DE_ASSERT(!isCoreTextureParam(contextType, pname)); - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::getTextureParamExtension(pname); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::getTextureParamExtension(pname); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::getTextureParamExtension(pname); @@ -645,7 +706,9 @@ static RequiredExtensions getQueryExtension (const glu::ContextType& contextType { DE_ASSERT(!isCoreQuery(contextType, query)); - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::getQueryExtension(query); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::getQueryExtension(query); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::getQueryExtension(query); @@ -662,7 +725,9 @@ static RequiredExtensions getTesterExtension (const glu::ContextType& contextTyp { DE_ASSERT(!isCoreTester(contextType, tester)); - if (contextSupports(contextType, glu::ApiType::es(3,2))) + if (contextSupports(contextType, glu::ApiType::core(4,5))) + return gl45::getTesterExtension(tester); + else if (contextSupports(contextType, glu::ApiType::es(3,2))) return es32::getTesterExtension(tester); else if (contextSupports(contextType, glu::ApiType::es(3,1))) return es31::getTesterExtension(tester); diff --git a/modules/glshared/glsTextureTestUtil.cpp b/modules/glshared/glsTextureTestUtil.cpp index 06a337f..50b3d57 100644 --- a/modules/glshared/glsTextureTestUtil.cpp +++ b/modules/glshared/glsTextureTestUtil.cpp @@ -142,7 +142,7 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program) params["FRAG_IN"] = "varying"; params["FRAG_COLOR"] = "gl_FragColor"; } - else if (m_glslVersion == glu::GLSL_VERSION_300_ES || m_glslVersion == glu::GLSL_VERSION_310_ES || m_glslVersion == glu::GLSL_VERSION_320_ES || m_glslVersion == glu::GLSL_VERSION_330) + else if (m_glslVersion == glu::GLSL_VERSION_300_ES || m_glslVersion == glu::GLSL_VERSION_310_ES || m_glslVersion == glu::GLSL_VERSION_320_ES || m_glslVersion > glu::GLSL_VERSION_330) { const string version = glu::getGLSLVersionDeclaration(m_glslVersion); const char* ext = DE_NULL; @@ -180,7 +180,7 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program) const char* sampler = DE_NULL; const char* lookup = DE_NULL; - if (m_glslVersion == glu::GLSL_VERSION_300_ES || m_glslVersion == glu::GLSL_VERSION_310_ES || m_glslVersion == glu::GLSL_VERSION_320_ES || m_glslVersion == glu::GLSL_VERSION_330) + if (m_glslVersion == glu::GLSL_VERSION_300_ES || m_glslVersion == glu::GLSL_VERSION_310_ES || m_glslVersion == glu::GLSL_VERSION_320_ES || m_glslVersion > glu::GLSL_VERSION_330) { switch (program) {