Hash :
d6053daa
Author :
Date :
2019-12-05T17:46:23
Remove tabs from source files. WebKit's Subversion repo refuses to commit source files that contain tabs. Bug: angleproject:3439 Change-Id: I0a804bcfa0375a98e19945e20297c90d31106827 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954410 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// tes31Context_override.cpp:
// Issue 3687: Overrides for dEQP's OpenGL ES 3.1 test context
//
// Keep the delta compared to dEQP at a minimum
// clang-format off
#include "tes31Context.hpp"
#include "gluRenderContext.hpp"
#include "gluRenderConfig.hpp"
#include "gluFboRenderContext.hpp"
#include "gluContextInfo.hpp"
#include "gluDummyRenderContext.hpp"
#include "tcuCommandLine.hpp"
namespace deqp
{
namespace gles31
{
Context::Context (tcu::TestContext& testCtx)
: m_testCtx (testCtx)
, m_renderCtx (DE_NULL)
, m_contextInfo (DE_NULL)
{
if (m_testCtx.getCommandLine().getRunMode() == tcu::RUNMODE_EXECUTE)
createRenderContext();
else
{
// \todo [2016-11-15 pyry] Many tests (erroneously) inspect context type
// during test hierarchy construction. We should fix that
// and revert dummy context to advertise unknown context type.
m_renderCtx = new glu::DummyRenderContext(glu::ContextType(glu::ApiType::es(3,1)));
}
}
Context::~Context (void)
{
destroyRenderContext();
}
void Context::createRenderContext (void)
{
DE_ASSERT(!m_renderCtx && !m_contextInfo);
try
{
// Issue 3687
// OpenGL ES 3.2 contexts are not supported yet, and the 3.2 context creation failure results in
// tests that pass with the recreated 3.1 context being marked "fail".
// Revert with Issue 3688
#if 0
try
{
m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), glu::ApiType::es(3, 2));
}
catch (...)
{
m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), glu::ApiType::es(3, 1));
}
#else
// Override the original behavior (above) to only create a 3.1 context
m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), glu::ApiType::es(3, 1));
#endif
m_contextInfo = glu::ContextInfo::create(*m_renderCtx);
}
catch (...)
{
destroyRenderContext();
throw;
}
}
void Context::destroyRenderContext (void)
{
delete m_contextInfo;
delete m_renderCtx;
m_contextInfo = DE_NULL;
m_renderCtx = DE_NULL;
}
const tcu::RenderTarget& Context::getRenderTarget (void) const
{
return m_renderCtx->getRenderTarget();
}
} // gles31
} // deqp
// clang-format on