Commit ee2f3302 by Gert Wollny Committed by Commit Bot

Capture/Replay: recreate the EGL window if contexts don't match

In addition enable affected tests. Bug: angleproject:5955 Change-Id: I4fb72e38a633daa4565d3c0ae7cddb6ace7226f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891775 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 2303f19c
...@@ -62,6 +62,13 @@ class CaptureReplayTests ...@@ -62,6 +62,13 @@ class CaptureReplayTests
mOSWindow->disableErrorMessageDialog(); mOSWindow->disableErrorMessageDialog();
mOSWindow->setVisible(true); mOSWindow->setVisible(true);
if (mEGLWindow && !mEGLWindow->isContextVersion(testTraceInfo.replayContextMajorVersion,
testTraceInfo.replayContextMinorVersion))
{
EGLWindow::Delete(&mEGLWindow);
mEGLWindow = nullptr;
}
if (!mEGLWindow) if (!mEGLWindow)
{ {
mEGLWindow = EGLWindow::New(testTraceInfo.replayContextMajorVersion, mEGLWindow = EGLWindow::New(testTraceInfo.replayContextMajorVersion,
......
...@@ -25,7 +25,6 @@ SimpleOperationTest.ClearAndSwap/* ...@@ -25,7 +25,6 @@ SimpleOperationTest.ClearAndSwap/*
SimpleOperationTest.DrawQuadAndSwap/* SimpleOperationTest.DrawQuadAndSwap/*
# Crashed tests # Crashed tests
BlendMinMaxTest.*
BlitFramebufferANGLETest.* BlitFramebufferANGLETest.*
BufferDataTest.* BufferDataTest.*
ClipDistanceTest.* ClipDistanceTest.*
......
...@@ -90,6 +90,11 @@ EGLContext EGLWindow::getContext() const ...@@ -90,6 +90,11 @@ EGLContext EGLWindow::getContext() const
return mContext; return mContext;
} }
bool EGLWindow::isContextVersion(EGLint glesMajorVersion, EGLint glesMinorVersion) const
{
return mClientMajorVersion == glesMajorVersion && mClientMinorVersion == glesMinorVersion;
}
bool EGLWindow::initializeGL(OSWindow *osWindow, bool EGLWindow::initializeGL(OSWindow *osWindow,
angle::Library *glWindowingLibrary, angle::Library *glWindowingLibrary,
angle::GLESDriverType driverType, angle::GLESDriverType driverType,
......
...@@ -112,6 +112,8 @@ class ANGLE_UTIL_EXPORT EGLWindow : public GLWindowBase ...@@ -112,6 +112,8 @@ class ANGLE_UTIL_EXPORT EGLWindow : public GLWindowBase
EGLSurface getSurface() const; EGLSurface getSurface() const;
EGLContext getContext() const; EGLContext getContext() const;
bool isContextVersion(EGLint glesMajorVersion, EGLint glesMinorVersion) const;
// Internally initializes the Display, Surface and Context. // Internally initializes the Display, Surface and Context.
bool initializeGL(OSWindow *osWindow, bool initializeGL(OSWindow *osWindow,
angle::Library *glWindowingLibrary, angle::Library *glWindowingLibrary,
......
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