From 62704ccf722d7babc78064aa7b7f710742de81ab Mon Sep 17 00:00:00 2001 From: Alexander Galazin Date: Wed, 16 Aug 2017 11:36:01 +0200 Subject: [PATCH] Report tests using Draw*BaseVertex as NotSupported Draw*BaseVertex methods were added in GLES 3.2. Report tests using these methods as NotSupported if GLES 3.1 context is returned. Components: AOSP Affects: dEQP-GLES31.functional.draw_base_vertex.* Bug: 70716326 Test: run on google devices Change-Id: I87c918d5f66a0a5b547f8e625c662203a7f85048 (cherry picked from commit 1b1ea05b4e8d6e9dbb07187b0af6bc12c315fb4e) Merged-In: 1b1ea05b4e8d6e9dbb07187b0af6bc12c315fb4e --- modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp | 7 +++++++ modules/glshared/glsDrawTest.cpp | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp b/modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp index 11764c1..7b47e13 100644 --- a/modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp +++ b/modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp @@ -218,6 +218,13 @@ VertexIDCase::~VertexIDCase (void) void VertexIDCase::init (void) { + if (m_method == deqp::gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_BASEVERTEX || + m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX || + m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX) + { + TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version."); + } + m_testCtx.getLog() << TestLog::Message << "gl_VertexID should be the index of the vertex that is being passed to the shader. i.e. indices[i] + basevertex" << TestLog::EndMessage; diff --git a/modules/glshared/glsDrawTest.cpp b/modules/glshared/glsDrawTest.cpp index 155bd35..472c5ea 100644 --- a/modules/glshared/glsDrawTest.cpp +++ b/modules/glshared/glsDrawTest.cpp @@ -3150,10 +3150,18 @@ void DrawTest::deinit (void) DrawTest::IterateResult DrawTest::iterate (void) { const int specNdx = (m_iteration / 2); + const DrawTestSpec& spec = m_specs[specNdx]; + + if (spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_BASEVERTEX || + spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX || + spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX) + { + TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(m_renderCtx.getType(), glu::ApiType::es(3, 2)), "Tests requires a 3.2 context or higher context version."); + } + const bool drawStep = (m_iteration % 2) == 0; const bool compareStep = (m_iteration % 2) == 1; const IterateResult iterateResult = ((size_t)m_iteration + 1 == m_specs.size()*2) ? (STOP) : (CONTINUE); - const DrawTestSpec& spec = m_specs[specNdx]; const bool updateProgram = (m_iteration == 0) || (drawStep && !checkSpecsShaderCompatible(m_specs[specNdx], m_specs[specNdx-1])); // try to use the same shader in all iterations IterationLogSectionEmitter sectionEmitter (m_testCtx.getLog(), specNdx, m_specs.size(), m_iteration_descriptions[specNdx], drawStep && m_specs.size()!=1); -- 2.7.4