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.");
+ const bool supportsES32 = contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2));
+ TCU_CHECK_AND_THROW(NotSupportedError, supportsES32 || m_context.getContextInfo().isExtensionSupported("GL_EXT_draw_elements_base_vertex"), "GL_EXT_draw_elements_base_vertex is not supported.");
}
m_testCtx.getLog() << TestLog::Message
#include "tcuFloat.hpp"
#include "tcuTextureUtil.hpp"
+#include "gluContextInfo.hpp"
#include "gluPixelTransfer.hpp"
#include "gluCallLogWrapper.hpp"
DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const DrawTestSpec& spec, const char* name, const char* desc)
: TestCase (testCtx, name, desc)
, m_renderCtx (renderCtx)
+ , m_contextInfo (DE_NULL)
, m_refBuffers (DE_NULL)
, m_refContext (DE_NULL)
, m_glesContext (DE_NULL)
DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc)
: TestCase (testCtx, name, desc)
, m_renderCtx (renderCtx)
+ , m_contextInfo (DE_NULL)
, m_refBuffers (DE_NULL)
, m_refContext (DE_NULL)
, m_glesContext (DE_NULL)
m_maxDiffRed = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().redBits)));
m_maxDiffGreen = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().greenBits)));
m_maxDiffBlue = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().blueBits)));
+ m_contextInfo = glu::ContextInfo::create(m_renderCtx);
}
void DrawTest::deinit (void)
delete m_refBuffers;
delete m_refContext;
delete m_glesContext;
+ delete m_contextInfo;
m_glArrayPack = DE_NULL;
m_rrArrayPack = DE_NULL;
m_refBuffers = DE_NULL;
m_refContext = DE_NULL;
m_glesContext = DE_NULL;
+ m_contextInfo = DE_NULL;
}
DrawTest::IterateResult DrawTest::iterate (void)
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 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 drawStep = (m_iteration % 2) == 0;