Commit 467f174f by Jamie Madill Committed by Commit Bot

Remove EGLTest.

Consolidate these tests into ANGLETest. Add a new parameter to PlatformParameters that lets us skip normal test setup. This removes the last 'configless' tests from angle_end2end_tests. Bug: angleproject:3393 Change-Id: I87186698ade90f95577534eb8ed1dfd4245f740e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590467 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 97f0affb
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
// This test will try to use all combinations of context configs and // This test will try to use all combinations of context configs and
// surface configs. If the configs are compatible, it checks that simple // surface configs. If the configs are compatible, it checks that simple
// rendering works, otherwise it checks an error is generated one MakeCurrent. // rendering works, otherwise it checks an error is generated one MakeCurrent.
//
// Only run the EGLContextCompatibilityTest on release builds. The execution time of this test
// scales with the square of the number of configs exposed and can time out in some debug builds.
// http://anglebug.com/2121
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <vector> #include <vector>
...@@ -25,15 +30,14 @@ namespace ...@@ -25,15 +30,14 @@ namespace
const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE};
} }
class EGLContextCompatibilityTest : public EGLTest, class EGLContextCompatibilityTest : public ANGLETest
public testing::WithParamInterface<PlatformParameters>
{ {
public: public:
EGLContextCompatibilityTest() : mDisplay(0) {} EGLContextCompatibilityTest() : mDisplay(0) {}
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
ASSERT_TRUE(eglGetPlatformDisplayEXT != nullptr); ASSERT_TRUE(eglGetPlatformDisplayEXT != nullptr);
...@@ -59,6 +63,8 @@ class EGLContextCompatibilityTest : public EGLTest, ...@@ -59,6 +63,8 @@ class EGLContextCompatibilityTest : public EGLTest,
{ {
eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglTerminate(mDisplay); eglTerminate(mDisplay);
ANGLETest::TearDown();
} }
protected: protected:
...@@ -248,6 +254,8 @@ class EGLContextCompatibilityTest : public EGLTest, ...@@ -248,6 +254,8 @@ class EGLContextCompatibilityTest : public EGLTest,
// same config can render. // same config can render.
TEST_P(EGLContextCompatibilityTest, WindowSameConfig) TEST_P(EGLContextCompatibilityTest, WindowSameConfig)
{ {
ANGLE_SKIP_TEST_IF(IsDebug()); // http://anglebug.com/2121
for (size_t i = 0; i < mConfigs.size(); i++) for (size_t i = 0; i < mConfigs.size(); i++)
{ {
EGLConfig config = mConfigs[i]; EGLConfig config = mConfigs[i];
...@@ -275,6 +283,8 @@ TEST_P(EGLContextCompatibilityTest, WindowSameConfig) ...@@ -275,6 +283,8 @@ TEST_P(EGLContextCompatibilityTest, WindowSameConfig)
// same config can render. // same config can render.
TEST_P(EGLContextCompatibilityTest, PbufferSameConfig) TEST_P(EGLContextCompatibilityTest, PbufferSameConfig)
{ {
ANGLE_SKIP_TEST_IF(IsDebug()); // http://anglebug.com/2121
for (size_t i = 0; i < mConfigs.size(); i++) for (size_t i = 0; i < mConfigs.size(); i++)
{ {
EGLConfig config = mConfigs[i]; EGLConfig config = mConfigs[i];
...@@ -301,6 +311,8 @@ TEST_P(EGLContextCompatibilityTest, PbufferSameConfig) ...@@ -301,6 +311,8 @@ TEST_P(EGLContextCompatibilityTest, PbufferSameConfig)
// config works or errors according to the EGL compatibility rules // config works or errors according to the EGL compatibility rules
TEST_P(EGLContextCompatibilityTest, WindowDifferentConfig) TEST_P(EGLContextCompatibilityTest, WindowDifferentConfig)
{ {
ANGLE_SKIP_TEST_IF(IsDebug()); // http://anglebug.com/2121
// anglebug.com/2183 // anglebug.com/2183
// Actually failed only on (IsIntel() && IsWindows() && IsD3D11()), // Actually failed only on (IsIntel() && IsWindows() && IsD3D11()),
// but it's impossible to do other tests since GL_RENDERER is NULL // but it's impossible to do other tests since GL_RENDERER is NULL
...@@ -348,6 +360,8 @@ TEST_P(EGLContextCompatibilityTest, WindowDifferentConfig) ...@@ -348,6 +360,8 @@ TEST_P(EGLContextCompatibilityTest, WindowDifferentConfig)
// config works or errors according to the EGL compatibility rules // config works or errors according to the EGL compatibility rules
TEST_P(EGLContextCompatibilityTest, PbufferDifferentConfig) TEST_P(EGLContextCompatibilityTest, PbufferDifferentConfig)
{ {
ANGLE_SKIP_TEST_IF(IsDebug()); // http://anglebug.com/2121
for (size_t i = 0; i < mConfigs.size(); i++) for (size_t i = 0; i < mConfigs.size(); i++)
{ {
EGLConfig config1 = mConfigs[i]; EGLConfig config1 = mConfigs[i];
...@@ -384,14 +398,9 @@ TEST_P(EGLContextCompatibilityTest, PbufferDifferentConfig) ...@@ -384,14 +398,9 @@ TEST_P(EGLContextCompatibilityTest, PbufferDifferentConfig)
} }
} }
// Only run the EGLContextCompatibilityTest on release builds. The execution time of this test
// scales with the square of the number of configs exposed and can time out in some debug builds.
// http://anglebug.com/2121
#if defined(NDEBUG)
ANGLE_INSTANTIATE_TEST(EGLContextCompatibilityTest, ANGLE_INSTANTIATE_TEST(EGLContextCompatibilityTest,
ES2_D3D9(), WithNoFixture(ES2_D3D9()),
ES2_D3D11(), WithNoFixture(ES2_D3D11()),
ES2_OPENGL(), WithNoFixture(ES2_OPENGL()),
ES2_OPENGLES(), WithNoFixture(ES2_OPENGLES()),
ES2_VULKAN()); WithNoFixture(ES2_VULKAN()));
#endif // defined(NDEBUG)
...@@ -22,12 +22,11 @@ ...@@ -22,12 +22,11 @@
using namespace angle; using namespace angle;
class EGLDeviceCreationTest : public EGLTest class EGLDeviceCreationTest : public ANGLETest
{ {
protected: protected:
EGLDeviceCreationTest() EGLDeviceCreationTest()
: mD3D11Available(false), : mD3D11Module(nullptr),
mD3D11Module(nullptr),
mD3D11CreateDevice(nullptr), mD3D11CreateDevice(nullptr),
mDevice(nullptr), mDevice(nullptr),
mDeviceContext(nullptr), mDeviceContext(nullptr),
...@@ -41,7 +40,9 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -41,7 +40,9 @@ class EGLDeviceCreationTest : public EGLTest
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
ASSERT_TRUE(isD3D11Renderer());
mD3D11Module = LoadLibrary(TEXT("d3d11.dll")); mD3D11Module = LoadLibrary(TEXT("d3d11.dll"));
if (mD3D11Module == nullptr) if (mD3D11Module == nullptr)
...@@ -58,8 +59,6 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -58,8 +59,6 @@ class EGLDeviceCreationTest : public EGLTest
return; return;
} }
mD3D11Available = true;
const char *extensionString = const char *extensionString =
static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)); static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS));
if (strstr(extensionString, "EGL_ANGLE_device_creation")) if (strstr(extensionString, "EGL_ANGLE_device_creation"))
...@@ -95,11 +94,12 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -95,11 +94,12 @@ class EGLDeviceCreationTest : public EGLTest
eglTerminate(mDisplay); eglTerminate(mDisplay);
mDisplay = EGL_NO_DISPLAY; mDisplay = EGL_NO_DISPLAY;
} }
ANGLETest::TearDown();
} }
void CreateD3D11Device() void CreateD3D11Device()
{ {
ASSERT_TRUE(mD3D11Available);
ASSERT_EQ(nullptr, mDevice); // The device shouldn't be created twice ASSERT_EQ(nullptr, mDevice); // The device shouldn't be created twice
HRESULT hr = HRESULT hr =
...@@ -112,7 +112,6 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -112,7 +112,6 @@ class EGLDeviceCreationTest : public EGLTest
void CreateD3D11FL9_3Device() void CreateD3D11FL9_3Device()
{ {
ASSERT_TRUE(mD3D11Available);
ASSERT_EQ(nullptr, mDevice); ASSERT_EQ(nullptr, mDevice);
D3D_FEATURE_LEVEL fl93 = D3D_FEATURE_LEVEL_9_3; D3D_FEATURE_LEVEL fl93 = D3D_FEATURE_LEVEL_9_3;
...@@ -176,7 +175,6 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -176,7 +175,6 @@ class EGLDeviceCreationTest : public EGLTest
ASSERT_TRUE(FAILED(result)); ASSERT_TRUE(FAILED(result));
} }
bool mD3D11Available;
HMODULE mD3D11Module; HMODULE mD3D11Module;
PFN_D3D11_CREATE_DEVICE mD3D11CreateDevice; PFN_D3D11_CREATE_DEVICE mD3D11CreateDevice;
...@@ -196,13 +194,9 @@ class EGLDeviceCreationTest : public EGLTest ...@@ -196,13 +194,9 @@ class EGLDeviceCreationTest : public EGLTest
// Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve // Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve
// D3D11 device // D3D11 device
TEST_F(EGLDeviceCreationTest, BasicD3D11Device) TEST_P(EGLDeviceCreationTest, BasicD3D11Device)
{ {
if (!mDeviceCreationD3D11ExtAvailable || !mD3D11Available) ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
{
std::cout << "EGLDevice creation and/or D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
...@@ -223,13 +217,9 @@ TEST_F(EGLDeviceCreationTest, BasicD3D11Device) ...@@ -223,13 +217,9 @@ TEST_F(EGLDeviceCreationTest, BasicD3D11Device)
// Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve // Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve
// D3D11 device // D3D11 device
TEST_F(EGLDeviceCreationTest, BasicD3D11DeviceViaFuncPointer) TEST_P(EGLDeviceCreationTest, BasicD3D11DeviceViaFuncPointer)
{ {
if (!mDeviceCreationD3D11ExtAvailable || !mD3D11Available) ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
{
std::cout << "EGLDevice creation and/or D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
...@@ -249,14 +239,8 @@ TEST_F(EGLDeviceCreationTest, BasicD3D11DeviceViaFuncPointer) ...@@ -249,14 +239,8 @@ TEST_F(EGLDeviceCreationTest, BasicD3D11DeviceViaFuncPointer)
} }
// Test that creating a EGLDeviceEXT from D3D11 device works, and can be used for rendering // Test that creating a EGLDeviceEXT from D3D11 device works, and can be used for rendering
TEST_F(EGLDeviceCreationTest, RenderingUsingD3D11Device) TEST_P(EGLDeviceCreationTest, RenderingUsingD3D11Device)
{ {
if (!mD3D11Available)
{
std::cout << "D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
EGLDeviceEXT eglDevice = EGLDeviceEXT eglDevice =
...@@ -283,14 +267,8 @@ TEST_F(EGLDeviceCreationTest, RenderingUsingD3D11Device) ...@@ -283,14 +267,8 @@ TEST_F(EGLDeviceCreationTest, RenderingUsingD3D11Device)
} }
// Test that ANGLE doesn't try to recreate a D3D11 device if the inputted one is lost // Test that ANGLE doesn't try to recreate a D3D11 device if the inputted one is lost
TEST_F(EGLDeviceCreationTest, D3D11DeviceRecovery) TEST_P(EGLDeviceCreationTest, D3D11DeviceRecovery)
{ {
if (!mD3D11Available)
{
std::cout << "D3D11 not available, skipping test" << std::endl;
return;
}
// Force Feature Level 9_3 so we can easily trigger a device lost later // Force Feature Level 9_3 so we can easily trigger a device lost later
CreateD3D11FL9_3Device(); CreateD3D11FL9_3Device();
...@@ -351,14 +329,8 @@ TEST_F(EGLDeviceCreationTest, D3D11DeviceRecovery) ...@@ -351,14 +329,8 @@ TEST_F(EGLDeviceCreationTest, D3D11DeviceRecovery)
} }
// Test that calling eglGetPlatformDisplayEXT with the same device returns the same display // Test that calling eglGetPlatformDisplayEXT with the same device returns the same display
TEST_F(EGLDeviceCreationTest, getPlatformDisplayTwice) TEST_P(EGLDeviceCreationTest, GetPlatformDisplayTwice)
{ {
if (!mD3D11Available)
{
std::cout << "D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
EGLDeviceEXT eglDevice = EGLDeviceEXT eglDevice =
...@@ -379,13 +351,9 @@ TEST_F(EGLDeviceCreationTest, getPlatformDisplayTwice) ...@@ -379,13 +351,9 @@ TEST_F(EGLDeviceCreationTest, getPlatformDisplayTwice)
} }
// Test that creating a EGLDeviceEXT from an invalid D3D11 device fails // Test that creating a EGLDeviceEXT from an invalid D3D11 device fails
TEST_F(EGLDeviceCreationTest, InvalidD3D11Device) TEST_P(EGLDeviceCreationTest, InvalidD3D11Device)
{ {
if (!mDeviceCreationD3D11ExtAvailable || !mD3D11Available) ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
{
std::cout << "EGLDevice creation and/or D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
...@@ -397,13 +365,9 @@ TEST_F(EGLDeviceCreationTest, InvalidD3D11Device) ...@@ -397,13 +365,9 @@ TEST_F(EGLDeviceCreationTest, InvalidD3D11Device)
} }
// Test that EGLDeviceEXT holds a ref to the D3D11 device // Test that EGLDeviceEXT holds a ref to the D3D11 device
TEST_F(EGLDeviceCreationTest, D3D11DeviceReferenceCounting) TEST_P(EGLDeviceCreationTest, D3D11DeviceReferenceCounting)
{ {
if (!mDeviceCreationD3D11ExtAvailable || !mD3D11Available) ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
{
std::cout << "EGLDevice creation and/or D3D11 not available, skipping test" << std::endl;
return;
}
CreateD3D11Device(); CreateD3D11Device();
...@@ -427,13 +391,9 @@ TEST_F(EGLDeviceCreationTest, D3D11DeviceReferenceCounting) ...@@ -427,13 +391,9 @@ TEST_F(EGLDeviceCreationTest, D3D11DeviceReferenceCounting)
} }
// Test that creating a EGLDeviceEXT from a D3D9 device fails // Test that creating a EGLDeviceEXT from a D3D9 device fails
TEST_F(EGLDeviceCreationTest, AnyD3D9Device) TEST_P(EGLDeviceCreationTest, AnyD3D9Device)
{ {
if (!mDeviceCreationD3D11ExtAvailable) ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
{
std::cout << "EGLDevice creation not available, skipping test" << std::endl;
return;
}
std::string fakeD3DDevice = "This is a string, not a D3D device"; std::string fakeD3DDevice = "This is a string, not a D3D device";
...@@ -562,4 +522,5 @@ TEST_P(EGLDeviceQueryTest, GetPlatformDisplayDeviceReuse) ...@@ -562,4 +522,5 @@ TEST_P(EGLDeviceQueryTest, GetPlatformDisplayDeviceReuse)
// Use this to select which configurations (e.g. which renderer, which GLES major version) these // Use this to select which configurations (e.g. which renderer, which GLES major version) these
// tests should be run against. // tests should be run against.
ANGLE_INSTANTIATE_TEST(EGLDeviceCreationTest, WithNoFixture(ES2_D3D11()));
ANGLE_INSTANTIATE_TEST(EGLDeviceQueryTest, ES2_D3D9(), ES2_D3D11()); ANGLE_INSTANTIATE_TEST(EGLDeviceQueryTest, ES2_D3D9(), ES2_D3D11());
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
using namespace angle; using namespace angle;
class EGLPresentPathD3D11 : public EGLTest, public testing::WithParamInterface<PlatformParameters> class EGLPresentPathD3D11 : public ANGLETest
{ {
protected: protected:
EGLPresentPathD3D11() EGLPresentPathD3D11()
...@@ -29,7 +29,7 @@ class EGLPresentPathD3D11 : public EGLTest, public testing::WithParamInterface<P ...@@ -29,7 +29,7 @@ class EGLPresentPathD3D11 : public EGLTest, public testing::WithParamInterface<P
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
mOSWindow = OSWindow::New(); mOSWindow = OSWindow::New();
mWindowWidth = 64; mWindowWidth = 64;
...@@ -170,6 +170,8 @@ class EGLPresentPathD3D11 : public EGLTest, public testing::WithParamInterface<P ...@@ -170,6 +170,8 @@ class EGLPresentPathD3D11 : public EGLTest, public testing::WithParamInterface<P
mOSWindow->destroy(); mOSWindow->destroy();
OSWindow::Delete(&mOSWindow); OSWindow::Delete(&mOSWindow);
ANGLETest::TearDown();
} }
void drawQuadUsingGL() void drawQuadUsingGL()
...@@ -369,4 +371,4 @@ TEST_P(EGLPresentPathD3D11, ClientBufferPresentPathCopy) ...@@ -369,4 +371,4 @@ TEST_P(EGLPresentPathD3D11, ClientBufferPresentPathCopy)
checkPixelsUsingD3D(false); checkPixelsUsingD3D(false);
} }
ANGLE_INSTANTIATE_TEST(EGLPresentPathD3D11, ES2_D3D11()); ANGLE_INSTANTIATE_TEST(EGLPresentPathD3D11, WithNoFixture(ES2_D3D11()));
\ No newline at end of file
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
using namespace angle; using namespace angle;
class EGLQueryContextTest : public EGLTest, public testing::WithParamInterface<PlatformParameters> class EGLQueryContextTest : public ANGLETest
{ {
public: public:
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
int clientVersion = GetParam().majorVersion; int clientVersion = GetParam().majorVersion;
...@@ -59,6 +59,8 @@ class EGLQueryContextTest : public EGLTest, public testing::WithParamInterface<P ...@@ -59,6 +59,8 @@ class EGLQueryContextTest : public EGLTest, public testing::WithParamInterface<P
eglTerminate(mDisplay); eglTerminate(mDisplay);
} }
ASSERT_EGL_SUCCESS() << "Error during test TearDown"; ASSERT_EGL_SUCCESS() << "Error during test TearDown";
ANGLETest::TearDown();
} }
EGLDisplay mDisplay; EGLDisplay mDisplay;
...@@ -145,9 +147,9 @@ TEST_P(EGLQueryContextTest, BadAttribute) ...@@ -145,9 +147,9 @@ TEST_P(EGLQueryContextTest, BadAttribute)
} }
ANGLE_INSTANTIATE_TEST(EGLQueryContextTest, ANGLE_INSTANTIATE_TEST(EGLQueryContextTest,
ES2_D3D9(), WithNoFixture(ES2_D3D9()),
ES2_D3D11(), WithNoFixture(ES2_D3D11()),
ES2_OPENGL(), WithNoFixture(ES2_OPENGL()),
ES2_VULKAN(), WithNoFixture(ES2_VULKAN()),
ES3_D3D11(), WithNoFixture(ES3_D3D11()),
ES3_OPENGL()); WithNoFixture(ES3_OPENGL()));
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
// //
// EGLRobustnessTest.cpp: tests for EGL_EXT_create_context_robustness // EGLRobustnessTest.cpp: tests for EGL_EXT_create_context_robustness
//
// Tests causing GPU resets are disabled, use the following args to run them:
// --gtest_also_run_disabled_tests --gtest_filter=EGLRobustnessTest\*
#include <gtest/gtest.h> #include <gtest/gtest.h>
...@@ -13,13 +16,12 @@ ...@@ -13,13 +16,12 @@
using namespace angle; using namespace angle;
class EGLRobustnessTest : public EGLTest, class EGLRobustnessTest : public ANGLETest
public ::testing::WithParamInterface<angle::PlatformParameters>
{ {
public: public:
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
mOSWindow = OSWindow::New(); mOSWindow = OSWindow::New();
mOSWindow->initialize("EGLRobustnessTest", 500, 500); mOSWindow->initialize("EGLRobustnessTest", 500, 500);
...@@ -81,6 +83,8 @@ class EGLRobustnessTest : public EGLTest, ...@@ -81,6 +83,8 @@ class EGLRobustnessTest : public EGLTest,
EXPECT_EGL_SUCCESS(); EXPECT_EGL_SUCCESS();
OSWindow::Delete(&mOSWindow); OSWindow::Delete(&mOSWindow);
ANGLETest::TearDown();
} }
void createContext(EGLint resetStrategy) void createContext(EGLint resetStrategy)
...@@ -154,21 +158,14 @@ class EGLRobustnessTest : public EGLTest, ...@@ -154,21 +158,14 @@ class EGLRobustnessTest : public EGLTest,
// Check glGetGraphicsResetStatusEXT returns GL_NO_ERROR if we did nothing // Check glGetGraphicsResetStatusEXT returns GL_NO_ERROR if we did nothing
TEST_P(EGLRobustnessTest, NoErrorByDefault) TEST_P(EGLRobustnessTest, NoErrorByDefault)
{ {
if (!mInitialized) ANGLE_SKIP_TEST_IF(!mInitialized);
{
return;
}
ASSERT_TRUE(glGetGraphicsResetStatusEXT() == GL_NO_ERROR); ASSERT_TRUE(glGetGraphicsResetStatusEXT() == GL_NO_ERROR);
} }
// Checks that the application gets no loss with NO_RESET_NOTIFICATION // Checks that the application gets no loss with NO_RESET_NOTIFICATION
TEST_P(EGLRobustnessTest, DISABLED_NoResetNotification) TEST_P(EGLRobustnessTest, DISABLED_NoResetNotification)
{ {
if (!mInitialized) ANGLE_SKIP_TEST_IF(!mInitialized);
{
return;
}
createContext(EGL_NO_RESET_NOTIFICATION_EXT); createContext(EGL_NO_RESET_NOTIFICATION_EXT);
if (!IsWindows()) if (!IsWindows())
...@@ -190,10 +187,10 @@ TEST_P(EGLRobustnessTest, DISABLED_NoResetNotification) ...@@ -190,10 +187,10 @@ TEST_P(EGLRobustnessTest, DISABLED_NoResetNotification)
// the computer is rebooted. // the computer is rebooted.
TEST_P(EGLRobustnessTest, DISABLED_ResettingDisplayWorks) TEST_P(EGLRobustnessTest, DISABLED_ResettingDisplayWorks)
{ {
if (!mInitialized) // Note that on Windows the OpenGL driver fails hard (popup that closes the application)
{ // on a TDR caused by D3D. Don't run D3D tests at the same time as the OpenGL tests.
return; ANGLE_SKIP_TEST_IF(IsWindows() && isGLRenderer());
} ANGLE_SKIP_TEST_IF(!mInitialized);
createContext(EGL_LOSE_CONTEXT_ON_RESET_EXT); createContext(EGL_LOSE_CONTEXT_ON_RESET_EXT);
...@@ -213,14 +210,8 @@ TEST_P(EGLRobustnessTest, DISABLED_ResettingDisplayWorks) ...@@ -213,14 +210,8 @@ TEST_P(EGLRobustnessTest, DISABLED_ResettingDisplayWorks)
ASSERT_TRUE(glGetGraphicsResetStatusEXT() == GL_NO_ERROR); ASSERT_TRUE(glGetGraphicsResetStatusEXT() == GL_NO_ERROR);
} }
// Tests causing GPU resets are disabled, use the following args to run them: ANGLE_INSTANTIATE_TEST(EGLRobustnessTest,
// --gtest_also_run_disabled_tests --gtest_filter=EGLRobustnessTest\* WithNoFixture(ES2_VULKAN()),
WithNoFixture(ES2_D3D9()),
// Note that on Windows the OpenGL driver fails hard (popup that closes the application) WithNoFixture(ES2_D3D11()),
// if there was a TDR caused by D3D so we don't run D3D tests at the same time as the OpenGL tests. WithNoFixture(ES2_OPENGL()));
#define D3D_HAS_PRIORITY 1
#if D3D_HAS_PRIORITY && (defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_D3D11))
ANGLE_INSTANTIATE_TEST(EGLRobustnessTest, ES2_VULKAN(), ES2_D3D9(), ES2_D3D11());
#else
ANGLE_INSTANTIATE_TEST(EGLRobustnessTest, ES2_VULKAN(), ES2_OPENGL());
#endif
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
using namespace angle; using namespace angle;
class EGLSanityCheckTest : public EGLTest class EGLSanityCheckTest : public ANGLETest
{}; {};
// Checks the tests are running against ANGLE // Checks the tests are running against ANGLE
TEST_F(EGLSanityCheckTest, IsRunningOnANGLE) TEST_P(EGLSanityCheckTest, IsRunningOnANGLE)
{ {
const char *extensionString = const char *extensionString =
static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)); static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS));
...@@ -27,13 +27,13 @@ TEST_F(EGLSanityCheckTest, IsRunningOnANGLE) ...@@ -27,13 +27,13 @@ TEST_F(EGLSanityCheckTest, IsRunningOnANGLE)
} }
// Checks that getting function pointer works // Checks that getting function pointer works
TEST_F(EGLSanityCheckTest, HasGetPlatformDisplayEXT) TEST_P(EGLSanityCheckTest, HasGetPlatformDisplayEXT)
{ {
ASSERT_NE(eglGetPlatformDisplayEXT, nullptr); ASSERT_NE(eglGetPlatformDisplayEXT, nullptr);
} }
// Checks that calling GetProcAddress for a non-existant function fails. // Checks that calling GetProcAddress for a non-existant function fails.
TEST_F(EGLSanityCheckTest, GetProcAddressNegativeTest) TEST_P(EGLSanityCheckTest, GetProcAddressNegativeTest)
{ {
auto check = eglGetProcAddress("WigglyWombats"); auto check = eglGetProcAddress("WigglyWombats");
EXPECT_EQ(nullptr, check); EXPECT_EQ(nullptr, check);
...@@ -43,7 +43,7 @@ TEST_F(EGLSanityCheckTest, GetProcAddressNegativeTest) ...@@ -43,7 +43,7 @@ TEST_F(EGLSanityCheckTest, GetProcAddressNegativeTest)
// We can add specific exceptions here if needed. // We can add specific exceptions here if needed.
// Disabled because it was creating a large number of configs. This could even result // Disabled because it was creating a large number of configs. This could even result
// in a BDOD on Windows. // in a BDOD on Windows.
TEST_F(EGLSanityCheckTest, DISABLED_WhitelistMatchesSupport) TEST_P(EGLSanityCheckTest, DISABLED_WhitelistMatchesSupport)
{ {
// Has issues with Vulkan support detection on Android. // Has issues with Vulkan support detection on Android.
ANGLE_SKIP_TEST_IF(IsAndroid()); ANGLE_SKIP_TEST_IF(IsAndroid());
...@@ -87,3 +87,5 @@ TEST_F(EGLSanityCheckTest, DISABLED_WhitelistMatchesSupport) ...@@ -87,3 +87,5 @@ TEST_F(EGLSanityCheckTest, DISABLED_WhitelistMatchesSupport)
check(ES3_NULL()); check(ES3_NULL());
check(ES31_NULL()); check(ES31_NULL());
} }
ANGLE_INSTANTIATE_TEST(EGLSanityCheckTest, WithNoFixture(PlatformParameters()));
\ No newline at end of file
...@@ -30,8 +30,7 @@ using namespace angle; ...@@ -30,8 +30,7 @@ using namespace angle;
namespace namespace
{ {
class EGLSurfaceTest : public EGLTest, class EGLSurfaceTest : public ANGLETest
public ::testing::WithParamInterface<angle::PlatformParameters>
{ {
protected: protected:
EGLSurfaceTest() EGLSurfaceTest()
...@@ -45,7 +44,7 @@ class EGLSurfaceTest : public EGLTest, ...@@ -45,7 +44,7 @@ class EGLSurfaceTest : public EGLTest,
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
mOSWindow = OSWindow::New(); mOSWindow = OSWindow::New();
mOSWindow->initialize("EGLSurfaceTest", 64, 64); mOSWindow->initialize("EGLSurfaceTest", 64, 64);
...@@ -90,6 +89,8 @@ class EGLSurfaceTest : public EGLTest, ...@@ -90,6 +89,8 @@ class EGLSurfaceTest : public EGLTest,
OSWindow::Delete(&mOSWindow); OSWindow::Delete(&mOSWindow);
ASSERT_TRUE(mWindowSurface == EGL_NO_SURFACE && mContext == EGL_NO_CONTEXT); ASSERT_TRUE(mWindowSurface == EGL_NO_SURFACE && mContext == EGL_NO_CONTEXT);
ANGLETest::TearDown();
} }
void initializeDisplay() void initializeDisplay()
...@@ -738,15 +739,15 @@ TEST_P(EGLSurfaceTestD3D11, CreateSurfaceWithMSAA) ...@@ -738,15 +739,15 @@ TEST_P(EGLSurfaceTestD3D11, CreateSurfaceWithMSAA)
} // anonymous namespace } // anonymous namespace
ANGLE_INSTANTIATE_TEST(EGLSurfaceTest, ANGLE_INSTANTIATE_TEST(EGLSurfaceTest,
ES2_D3D9(), WithNoFixture(ES2_D3D9()),
ES2_D3D11(), WithNoFixture(ES2_D3D11()),
ES3_D3D11(), WithNoFixture(ES3_D3D11()),
ES2_OPENGL(), WithNoFixture(ES2_OPENGL()),
ES3_OPENGL(), WithNoFixture(ES3_OPENGL()),
ES2_OPENGLES(), WithNoFixture(ES2_OPENGLES()),
ES3_OPENGLES(), WithNoFixture(ES3_OPENGLES()),
ES2_VULKAN()); WithNoFixture(ES2_VULKAN()));
#if defined(ANGLE_ENABLE_D3D11) #if defined(ANGLE_ENABLE_D3D11)
ANGLE_INSTANTIATE_TEST(EGLSurfaceTestD3D11, ES2_D3D11(), ES3_D3D11()); ANGLE_INSTANTIATE_TEST(EGLSurfaceTestD3D11, WithNoFixture(ES2_D3D11()), WithNoFixture(ES3_D3D11()));
#endif #endif
...@@ -18,15 +18,14 @@ using namespace angle; ...@@ -18,15 +18,14 @@ using namespace angle;
namespace namespace
{ {
class EGLSurfacelessContextTest : public EGLTest, class EGLSurfacelessContextTest : public ANGLETest
public testing::WithParamInterface<PlatformParameters>
{ {
public: public:
EGLSurfacelessContextTest() : mDisplay(0) {} EGLSurfacelessContextTest() : mDisplay(0) {}
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
EGLint dispattrs[] = {EGL_PLATFORM_ANGLE_TYPE_ANGLE, GetParam().getRenderer(), EGL_NONE}; EGLint dispattrs[] = {EGL_PLATFORM_ANGLE_TYPE_ANGLE, GetParam().getRenderer(), EGL_NONE};
mDisplay = eglGetPlatformDisplayEXT( mDisplay = eglGetPlatformDisplayEXT(
...@@ -72,6 +71,8 @@ class EGLSurfacelessContextTest : public EGLTest, ...@@ -72,6 +71,8 @@ class EGLSurfacelessContextTest : public EGLTest,
} }
eglTerminate(mDisplay); eglTerminate(mDisplay);
ANGLETest::TearDown();
} }
protected: protected:
...@@ -261,7 +262,7 @@ TEST_P(EGLSurfacelessContextTest, Switcheroo) ...@@ -261,7 +262,7 @@ TEST_P(EGLSurfacelessContextTest, Switcheroo)
} // anonymous namespace } // anonymous namespace
ANGLE_INSTANTIATE_TEST(EGLSurfacelessContextTest, ANGLE_INSTANTIATE_TEST(EGLSurfacelessContextTest,
ES2_D3D9(), WithNoFixture(ES2_D3D9()),
ES2_D3D11(), WithNoFixture(ES2_D3D11()),
ES2_OPENGL(), WithNoFixture(ES2_OPENGL()),
ES2_VULKAN()); WithNoFixture(ES2_VULKAN()));
...@@ -24,13 +24,12 @@ namespace ...@@ -24,13 +24,12 @@ namespace
const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE};
} }
class EGLX11VisualHintTest : public EGLTest, class EGLX11VisualHintTest : public ANGLETest
public ::testing::WithParamInterface<angle::PlatformParameters>
{ {
public: public:
void SetUp() override void SetUp() override
{ {
EGLTest::SetUp(); ANGLETest::SetUp();
mDisplay = XOpenDisplay(nullptr); mDisplay = XOpenDisplay(nullptr);
} }
...@@ -208,4 +207,4 @@ TEST_P(EGLX11VisualHintTest, InvalidWindowVisualID) ...@@ -208,4 +207,4 @@ TEST_P(EGLX11VisualHintTest, InvalidWindowVisualID)
OSWindow::Delete(&osWindow); OSWindow::Delete(&osWindow);
} }
ANGLE_INSTANTIATE_TEST(EGLX11VisualHintTest, ES2_OPENGL()); ANGLE_INSTANTIATE_TEST(EGLX11VisualHintTest, WithNoFixture(ES2_OPENGL()));
...@@ -332,22 +332,34 @@ ANGLETestBase::ANGLETestBase(const angle::PlatformParameters &params) ...@@ -332,22 +332,34 @@ ANGLETestBase::ANGLETestBase(const angle::PlatformParameters &params)
angle::PlatformParameters withMethods = params; angle::PlatformParameters withMethods = params;
withMethods.eglParameters.platformMethods = &gDefaultPlatformMethods; withMethods.eglParameters.platformMethods = &gDefaultPlatformMethods;
auto iter = gPlatforms.find(withMethods); auto iter = gFixtures.find(withMethods);
if (iter != gPlatforms.end()) if (iter != gFixtures.end())
{ {
mCurrentParams = &iter->first; mCurrentParams = &iter->first;
if (!params.noFixture)
{
mFixture = &iter->second; mFixture = &iter->second;
mFixture->configParams.reset(); mFixture->configParams.reset();
}
return; return;
} }
TestFixture platform; TestFixture platform;
auto insertIter = gPlatforms.emplace(withMethods, platform); auto insertIter = gFixtures.emplace(withMethods, platform);
mCurrentParams = &insertIter.first->first; mCurrentParams = &insertIter.first->first;
if (!params.noFixture)
{
mFixture = &insertIter.first->second; mFixture = &insertIter.first->second;
initOSWindow();
}
}
void ANGLETestBase::initOSWindow()
{
std::stringstream windowNameStream; std::stringstream windowNameStream;
windowNameStream << "ANGLE Tests - " << params; windowNameStream << "ANGLE Tests - " << *mCurrentParams;
std::string windowName = windowNameStream.str(); std::string windowName = windowNameStream.str();
if (mAlwaysForceNewDisplay) if (mAlwaysForceNewDisplay)
...@@ -369,11 +381,12 @@ ANGLETestBase::ANGLETestBase(const angle::PlatformParameters &params) ...@@ -369,11 +381,12 @@ ANGLETestBase::ANGLETestBase(const angle::PlatformParameters &params)
// On Linux we must keep the test windows visible. On Windows it doesn't seem to need it. // On Linux we must keep the test windows visible. On Windows it doesn't seem to need it.
mFixture->osWindow->setVisible(!angle::IsWindows()); mFixture->osWindow->setVisible(!angle::IsWindows());
switch (params.driver) switch (mCurrentParams->driver)
{ {
case angle::GLESDriverType::AngleEGL: case angle::GLESDriverType::AngleEGL:
{ {
mFixture->eglWindow = EGLWindow::New(params.majorVersion, params.minorVersion); mFixture->eglWindow =
EGLWindow::New(mCurrentParams->majorVersion, mCurrentParams->minorVersion);
break; break;
} }
...@@ -425,6 +438,25 @@ void ANGLETestBase::ANGLETestSetUp() ...@@ -425,6 +438,25 @@ void ANGLETestBase::ANGLETestSetUp()
gPlatformContext.warningsAsErrors = false; gPlatformContext.warningsAsErrors = false;
gPlatformContext.currentTest = this; gPlatformContext.currentTest = this;
if (angle::IsWindows())
{
const auto &info = testing::UnitTest::GetInstance()->current_test_info();
angle::WriteDebugMessage("Entering %s.%s\n", info->test_case_name(), info->name());
}
if (mCurrentParams->noFixture)
{
#if defined(ANGLE_USE_UTIL_LOADER)
PFNEGLGETPROCADDRESSPROC getProcAddress;
ANGLETestEnvironment::GetEGLLibrary()->getAs("eglGetProcAddress", &getProcAddress);
ASSERT_NE(nullptr, getProcAddress);
angle::LoadEGL(getProcAddress);
angle::LoadGLES(getProcAddress);
#endif // defined(ANGLE_USE_UTIL_LOADER)
return;
}
// Resize the window before creating the context so that the first make current // Resize the window before creating the context so that the first make current
// sets the viewport and scissor box to the right size. // sets the viewport and scissor box to the right size.
bool needSwap = false; bool needSwap = false;
...@@ -483,17 +515,22 @@ void ANGLETestBase::ANGLETestSetUp() ...@@ -483,17 +515,22 @@ void ANGLETestBase::ANGLETestSetUp()
// taking OpenGL traces can guess the size of the default framebuffer and show it // taking OpenGL traces can guess the size of the default framebuffer and show it
// in their UIs // in their UIs
glViewport(0, 0, mWidth, mHeight); glViewport(0, 0, mWidth, mHeight);
const auto &info = testing::UnitTest::GetInstance()->current_test_info();
angle::WriteDebugMessage("Entering %s.%s\n", info->test_case_name(), info->name());
} }
void ANGLETestBase::ANGLETestTearDown() void ANGLETestBase::ANGLETestTearDown()
{ {
gPlatformContext.currentTest = nullptr; gPlatformContext.currentTest = nullptr;
if (angle::IsWindows())
{
const testing::TestInfo *info = testing::UnitTest::GetInstance()->current_test_info(); const testing::TestInfo *info = testing::UnitTest::GetInstance()->current_test_info();
angle::WriteDebugMessage("Exiting %s.%s\n", info->test_case_name(), info->name()); angle::WriteDebugMessage("Exiting %s.%s\n", info->test_case_name(), info->name());
}
if (mCurrentParams->noFixture)
{
return;
}
swapBuffers(); swapBuffers();
mFixture->osWindow->messageLoop(); mFixture->osWindow->messageLoop();
...@@ -1244,7 +1281,7 @@ ANGLETestBase::ScopedIgnorePlatformMessages::~ScopedIgnorePlatformMessages() ...@@ -1244,7 +1281,7 @@ ANGLETestBase::ScopedIgnorePlatformMessages::~ScopedIgnorePlatformMessages()
} }
OSWindow *ANGLETestBase::mOSWindowSingleton = nullptr; OSWindow *ANGLETestBase::mOSWindowSingleton = nullptr;
std::map<angle::PlatformParameters, ANGLETestBase::TestFixture> ANGLETestBase::gPlatforms; std::map<angle::PlatformParameters, ANGLETestBase::TestFixture> ANGLETestBase::gFixtures;
Optional<EGLint> ANGLETestBase::mLastRendererType; Optional<EGLint> ANGLETestBase::mLastRendererType;
std::unique_ptr<angle::Library> ANGLETestEnvironment::gEGLLibrary; std::unique_ptr<angle::Library> ANGLETestEnvironment::gEGLLibrary;
...@@ -1289,22 +1326,6 @@ void ANGLEProcessTestArgs(int *argc, char *argv[]) ...@@ -1289,22 +1326,6 @@ void ANGLEProcessTestArgs(int *argc, char *argv[])
} }
} }
EGLTest::EGLTest() = default;
EGLTest::~EGLTest() = default;
void EGLTest::SetUp()
{
#if defined(ANGLE_USE_UTIL_LOADER)
PFNEGLGETPROCADDRESSPROC getProcAddress;
ANGLETestEnvironment::GetEGLLibrary()->getAs("eglGetProcAddress", &getProcAddress);
ASSERT_NE(nullptr, getProcAddress);
angle::LoadEGL(getProcAddress);
angle::LoadGLES(getProcAddress);
#endif // defined(ANGLE_USE_UTIL_LOADER)
}
bool EnsureGLExtensionEnabled(const std::string &extName) bool EnsureGLExtensionEnabled(const std::string &extName)
{ {
if (IsGLExtensionEnabled("GL_ANGLE_request_extension") && IsGLExtensionRequestable(extName)) if (IsGLExtensionEnabled("GL_ANGLE_request_extension") && IsGLExtensionRequestable(extName))
......
...@@ -399,6 +399,17 @@ class ANGLETestBase ...@@ -399,6 +399,17 @@ class ANGLETestBase
~ScopedIgnorePlatformMessages(); ~ScopedIgnorePlatformMessages();
}; };
// Can be used before we get a GL context.
bool isGLRenderer() const
{
return mCurrentParams->getRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE;
}
bool isD3D11Renderer() const
{
return mCurrentParams->getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE;
}
private: private:
void checkD3D11SDKLayersMessages(); void checkD3D11SDKLayersMessages();
...@@ -410,6 +421,8 @@ class ANGLETestBase ...@@ -410,6 +421,8 @@ class ANGLETestBase
bool useInstancedDrawCalls, bool useInstancedDrawCalls,
GLuint numInstances); GLuint numInstances);
void initOSWindow();
struct TestFixture struct TestFixture
{ {
TestFixture(); TestFixture();
...@@ -444,7 +457,7 @@ class ANGLETestBase ...@@ -444,7 +457,7 @@ class ANGLETestBase
// different config. This OSWindow sharing seemed to lead to driver bugs on some platforms. // different config. This OSWindow sharing seemed to lead to driver bugs on some platforms.
static OSWindow *mOSWindowSingleton; static OSWindow *mOSWindowSingleton;
static std::map<angle::PlatformParameters, TestFixture> gPlatforms; static std::map<angle::PlatformParameters, TestFixture> gFixtures;
const angle::PlatformParameters *mCurrentParams; const angle::PlatformParameters *mCurrentParams;
TestFixture *mFixture; TestFixture *mFixture;
...@@ -493,16 +506,6 @@ class ANGLETestEnvironment : public testing::Environment ...@@ -493,16 +506,6 @@ class ANGLETestEnvironment : public testing::Environment
static std::unique_ptr<angle::Library> gWGLLibrary; static std::unique_ptr<angle::Library> gWGLLibrary;
}; };
// This base fixture loads the EGL entry points.
class EGLTest : public testing::Test
{
public:
EGLTest();
~EGLTest();
void SetUp() override;
};
// Driver vendors // Driver vendors
bool IsIntel(); bool IsIntel();
bool IsAdreno(); bool IsAdreno();
......
...@@ -18,6 +18,7 @@ PlatformParameters::PlatformParameters(EGLint majorVersion, ...@@ -18,6 +18,7 @@ PlatformParameters::PlatformParameters(EGLint majorVersion,
EGLint minorVersion, EGLint minorVersion,
const EGLPlatformParameters &eglPlatformParameters) const EGLPlatformParameters &eglPlatformParameters)
: driver(GLESDriverType::AngleEGL), : driver(GLESDriverType::AngleEGL),
noFixture(false),
eglParameters(eglPlatformParameters), eglParameters(eglPlatformParameters),
majorVersion(majorVersion), majorVersion(majorVersion),
minorVersion(minorVersion) minorVersion(minorVersion)
...@@ -28,7 +29,7 @@ PlatformParameters::PlatformParameters(EGLint majorVersion, ...@@ -28,7 +29,7 @@ PlatformParameters::PlatformParameters(EGLint majorVersion,
PlatformParameters::PlatformParameters(EGLint majorVersion, PlatformParameters::PlatformParameters(EGLint majorVersion,
EGLint minorVersion, EGLint minorVersion,
GLESDriverType driver) GLESDriverType driver)
: driver(driver), majorVersion(majorVersion), minorVersion(minorVersion) : driver(driver), noFixture(false), majorVersion(majorVersion), minorVersion(minorVersion)
{ {
initDefaultParameters(); initDefaultParameters();
} }
...@@ -164,6 +165,11 @@ std::ostream &operator<<(std::ostream &stream, const PlatformParameters &pp) ...@@ -164,6 +165,11 @@ std::ostream &operator<<(std::ostream &stream, const PlatformParameters &pp)
break; break;
} }
if (pp.noFixture)
{
stream << "_NoFixture";
}
if (pp.eglParameters.contextVirtualization == EGL_FALSE) if (pp.eglParameters.contextVirtualization == EGL_FALSE)
{ {
stream << "_NoVirtual"; stream << "_NoVirtual";
......
...@@ -47,9 +47,13 @@ struct PlatformParameters ...@@ -47,9 +47,13 @@ struct PlatformParameters
void initDefaultParameters(); void initDefaultParameters();
auto tie() const { return std::tie(driver, eglParameters, majorVersion, minorVersion); } auto tie() const
{
return std::tie(driver, noFixture, eglParameters, majorVersion, minorVersion);
}
GLESDriverType driver; GLESDriverType driver;
bool noFixture;
EGLPlatformParameters eglParameters; EGLPlatformParameters eglParameters;
EGLint majorVersion; EGLint majorVersion;
EGLint minorVersion; EGLint minorVersion;
...@@ -184,6 +188,12 @@ inline PlatformParameters WithNoVirtualContexts(const PlatformParameters &params ...@@ -184,6 +188,12 @@ inline PlatformParameters WithNoVirtualContexts(const PlatformParameters &params
return withNoVirtualContexts; return withNoVirtualContexts;
} }
inline PlatformParameters WithNoFixture(const PlatformParameters &params)
{
PlatformParameters withNoFixture = params;
withNoFixture.noFixture = true;
return withNoFixture;
}
} // namespace angle } // namespace angle
#endif // ANGLE_TEST_CONFIGS_H_ #endif // ANGLE_TEST_CONFIGS_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment